Pieter, 
I thought it was not a good idea to access sockets from different threads. In 
my java code, I am attempting to use thread local to have one publisher per 
thread instead of sharing one for all threads in the servlet containers thread 
pool. Is this not a good idea?

Regards,

Mike.
On Feb 25, 2011, at 5:41 AM, Pieter Hintjens wrote:

> On Fri, Feb 25, 2011 at 12:48 PM, Zoufal Andreas
> <[email protected]> wrote:
> 
>> thanks for the new version with a lot of good new features. But I have a 
>> question about ZMQ_LINGER. My test code breaks now at many points or hang. 
>> Of course, I have to use ZMQ_LINGER now to avoid zmq_term() to hang 
>> indefinitely for some tests, I read this in the manual. But now I run into 
>> another problem. I repeat the sequence (socket with linger option, bind, 
>> close) frequently, without send or receive action. Now I get errors 
>> "Addreass already in use", I guess because zmq_close() is not blocking for 
>> the lingering.
> 
> You should not need to use ZMQ_LINGER to avoid zmq_term() blocking.
> Just close all sockets in the same thread before calling it.
> 
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> [email protected]
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to