micro-toolkit / zmq-service-suite-ruby

ZMQ Service Oriented Architecture Suite - Ruby Client&Service
MIT License
14 stars 6 forks source link

Implement async calls on client #1

Open pjanuario opened 10 years ago

pjanuario commented 10 years ago

Client should allow to execute multiple calls and wait for responses.

# unblocking calls
message_id = PongService.ping("payload", async: true)
message_id2 = PongService.ping("payload2", async: true)

# blocking until timeout or results
result1, result2 = PongService.wait([message_id, message_id2])

The call should support the same logic.