The mutex is "required" because it guarantees that it is only used by a single thread at a time. ZMQ has assertions that will cause your application to crash if you access a socket between two threads concurrently.

Joshua

January 2, 2013 6:58 PM
Charles.. the most relevant (to my use case) piece there is.. "For those situations where a dedicated socket per thread is infeasible, a socket may be shared if and only if each thread executes a full memory barrier before accessing the socket. Most languages support a Mutex or Spinlock which will execute the full memory barrier on your behalf." 

However, I was wondering that given my app logic below, do I need to use mutex etc?.. each thread is completely independent of the other.. no shared objects.

thanks
NIshant






--
Nishant Mittal           
Director, Product Development
Rosenblatt Securities Inc.
20 Broad Street
New York, NY 10005            

Direct: 212-607-3159
Mobile: 646-504-2629
_______________________________________________
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