[zeromq-dev] Thread-safe sockets (cont.)

Ivan Pechorin ivan.pechorin at gmail.com
Fri Feb 17 06:21:44 CET 2012



On 17.02.2012, at 3:32, john skaller <skaller at users.sourceforge.net> wrote:

> On 17/02/2012, at 9:05 AM, Chuck Remes wrote:
> 
>> On Feb 16, 2012, at 3:51 PM, Pieter Hintjens wrote:
>>> 
>> 
>> zmq_poll() would probably need to be modified to disallow multiple threads from polling. Alternately, zmq_poll() would need to disallow a poll_item list that contained a socket that is already a member of another call to zmq_poll() from another thread.
>> 
>> Ugly. Error prone. I don't see how this could work well without some hacks. And now "thread safety" would generate a shit-ton of additional questions about why zmq_poll() was so strict, broken, etc.
> 
> No need to change it at all. It is the same as now: if you misuse a feature, you can't
> expect reliable results.
> 
> The difference is now you get unexpected results instead of a segfault.

I believe, such a "feature" (unexpected behavior instead of segfault) is enough reason to revert the patch.


More information about the zeromq-dev mailing list