[zeromq-dev] Thread-safe sockets (cont.)
john skaller
skaller at users.sourceforge.net
Fri Feb 17 02:33:43 CET 2012
On 17/02/2012, at 11:41 AM, Pieter Hintjens wrote:
> John, if you had a single clear use case yourself, code which is ugly
> and fragile without this, and simpler with it, that would help a lot.
libzmq/tests/test_ts_context.cpp
uses it, you could rewrite that with inproc and compare.
I may have a real world use: the process manager norK I'm writing.
But it isn't there yet and I have other things to do simultaneously.
At present I'm gathering "published diagnostics" using Posix tricks and my
own thread safe queue, rather than 0MQ. This doesn't scale across networks.
But it was much easier to use in a prototype and leaves the program
not dependent on 0MQ, especially a variant that isn't stable and
might get the feature removed!
As mentioned elsewhere it just isn't clear if inproc will cut it.
I'm not a 0MQ expert, so I can't tell if HWM=0 is allowed,
but that would be required (I mean, blocking write where
the result is sent before proceeding: the read end can be
buffered).
The messages are event diagnostics so temporal sequencing is
desirable :)
--
john skaller
skaller at users.sourceforge.net
More information about the zeromq-dev
mailing list