[zeromq-dev] Thread-safe sockets (cont.)
Josh Quigley
josh at arbidyne.com.au
Thu Jun 27 08:31:20 CEST 2013
One 'easy-win' (if it is easy to implement) would be to allow zmq_poll to be
called from a different thread.
This would allow an async binding around zmq, where the application thread
owns all the zmq objects, but spawns a thread to wait on zmq_poll(-1L)
(indefinite wait for activity) and then post back to the application thread.
Then the application thread would do whatever access it wanted, following
the usual single-thread-only rule. For simplicity, it should be required
that only one call to zmq_poll can be a made at a time.
All of the async wrappers out there at the moment are trying to use the file
descriptors ZMQ exposes. These are difficult to handle in a
system-independent way, and also create problems with the edge-signalling
being unexpected behaviour for many users.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130627/d189c7cd/attachment.htm>
More information about the zeromq-dev
mailing list