[zeromq-dev] Thread Safe sockets
Pieter Hintjens
ph at imatix.com
Fri Feb 3 21:44:13 CET 2012
On Fri, Feb 3, 2012 at 5:05 PM, john skaller
<skaller at users.sourceforge.net> wrote:
> I have implemented (but not tested) thread safe sockets, available in Pull request.
> YMMV. Perhaps it should go in a branch or not get pulled at all.
I've merged the patch. It looks fun, and you didn't mention Felix
once, so extra points for you. A nice brutal solution to a problem
many people seem to have. Perhaps someone will improve the API, which
IMO should be done by setting up the context object before creating a
first socket (zmq_setctxopt). Or perhaps someone will find this patch
distasteful and undo it.
My advice for any such change would be (but this is with my
contributor hat on) to make a test case that shows it before and
after, to at least prove the code accurate. It's embarrassing to find
you got it wrong.
-Pieter
More information about the zeromq-dev
mailing list