[zeromq-dev] Issue 85 & 92

Pieter Hintjens ph at imatix.com
Sat Oct 16 19:14:50 CEST 2010


On Sat, Oct 16, 2010 at 5:18 PM, Martin Sustrik <sustrik at 250bpm.com> wrote:

>    //  directly modify sock's data from this thread
>    sock->some_variable = some_value;
>   //  crash!

Not if you use atomics, which is all you need for a flag saying "this
socket has been terminated, please do not allow further operations on
it".  It's fast and safe. You need to set and check one single bit.

> Almost all language runtimes do migrate sockets. Thus you have say 80%
> programs affected.

How did this work pre-2.1?  I was under the impression the only
language binding that had problems with this was Erlang.

-Pieter



More information about the zeromq-dev mailing list