[zeromq-dev] preparing bindings for 2.1 release?

Martin Sustrik sustrik at 250bpm.com
Fri Oct 1 16:42:56 CEST 2010


Alexey,

On 10/01/2010 11:35 AM, Alexey Ermakov wrote:

>> Does this have any impact in the binding implementation? I would say no.
>
> I think that you still need to ensure a memory barrier for a socket
> migrating between threads. Not sure what's the cheapest way to do that
> in JNI. Maybe it would be easier to declare send()/recv()/*sockopt
> synchronized?

That's what the language runtime should do anyway when it passes object 
between OS threads -- otherwise the new thread could see inconsistent 
data in the memory. We can just piggyback on the runtime's memory barrier.

Martin




More information about the zeromq-dev mailing list