You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you know ZMQ_FD implementation is edge triggered. Furthermore if any special method called on the socket, event is consumed (cleared). By special method I mean zmq_recv, zmq_send and zmq_getsockopt (latter at least with ZMQ_EVENTS option). So after reading, you must check if writing end should be waked up, and vice versa. I mean instead:
Thanks for the note. It would appear that bringing gevent_zeromq into pyzmq was a bit premature, and per Travis' recommendation, zmq.green will likely not be in the upcoming pyzmq-2.2.0 release, so it can bake in master for a while longer.
As you know ZMQ_FD implementation is edge triggered. Furthermore if any special method called on the socket, event is consumed (cleared). By special method I mean
zmq_recv
,zmq_send
andzmq_getsockopt
(latter at least with ZMQ_EVENTS option). So after reading, you must check if writing end should be waked up, and vice versa. I mean instead:It's better to write something like this:
And similar change should be for writing end.
Note: Care must be taken to not to wake up another greenlet in the middle of multi-part message.
The text was updated successfully, but these errors were encountered: