Closed laroque closed 7 years ago
ugh... why do I keep doing this to myself, the send_request method of service is blocking, which means that it cannot then handle_reply because it is still trying to send_request.... python 3's yield from syntax may offer a nice solution to this, I'll play with pika 0.10 and python 3.4 at some point, but for now I should give up
This issue was moved to project8/dripline-python#3
WARNING!... this isn't actually a starter project, it is kind of advanced.
Currently the sending a request involves using threading and a new connection to send a message and get a reply. This feels super dirty. I'd like to do something like:
... but I haven't got a solution for the yielding code block
should just send a request and then watch some local dictionary of responses for one with a matched correlation_id... need to have solutions to two issues: 1) still need to support timeout for getting the reply 2) need to make sure data-structures don't grow without bound if either replies collect but never get sent anywhere, or records of replies awaiting with reply do not grow similarly