hinge
hinge copied to clipboard
ZeroMQ sockets should not drain in a blocking manner on-read
Right now the on-read callback for a zmq-socket drains the 0MQ socket in a blocking function in the I/O callback until the read would block before returning from the callback.
Instead, the on-read callback should start a high-priority idle watcher (Higher than the delivery watcher, and if this approach is taken the priority values should be externalized to something resembling constants) which will then drain the socket until it would block, before resuming the IO callback.
Should wait on #8 and use the resulting API in a higher priority queue to drain the socket.