[zeromq-dev] preparing bindings for 2.1 release?
gonzalo diethelm
gdiethelm at dcv.cl
Fri Oct 1 19:35:59 CEST 2010
> >> 1. 0MQ sockets can be migrated between threads. This is important
for
> >> the bindings. For example, if 0MQ socket is passed to distinct gc
> thread
> >> once it is not used, the fact that it have been passed to different
OS
> >> thread may have caused troubles till now. With 2.1 this kind of
thing
> is
> >> legal. The same applies to languages that pass objects between OS
> >> threads even during their lifetime (Erlang).
> >
> > 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?
Do we really need to have a memory barrier at the binding level, or is
this taken care of by the library?
--
Gonzalo Diethelm
More information about the zeromq-dev
mailing list