[zeromq-dev] Thread Safe sockets

john skaller skaller at users.sourceforge.net
Fri Feb 3 18:19:53 CET 2012

On 04/02/2012, at 3:52 AM, Chuck Remes wrote:

> In my personal opinion, it sounds like an OK patch. If people don't use the new api call to allocate their context, they pay no penalty. Assuming that's the case, then I actually kind of like it.

There is a penalty. I believe it is small: two tests which could be reduced to one.
Compared to the actual operation being done, that seems irrelevant.
But I don't know: someone should probably measure it against some

Also, before the code is reverted away, it may be fun to run a couple
of benchmarks with and without the locking, so see exactly how
much the locks cost.

I can't do this, I don't have any code to test.

> Kind of odd that you wrote the patch if you don't even need it. I think I'm back to confusion about your goals in this message thread regarding libzmq & Felix.

When I come to a community like this I am taking something which, commercially,
would be quite expensive. And which people put a lot of work into.

So I like to give something back. It's partly for the "good feeling" but
also just plain sense in an environment based on free trade
of ideas (not to mention actual code patches :)

john skaller
skaller at users.sourceforge.net

More information about the zeromq-dev mailing list