On Tuesday, February 3, 2015 2:05 AM, Pieter Hintjens <p...@imatix.com> wrote:

> I've written up my understanding of this thread: http://hintjens.com/blog:84

> Thread safety would solve the perennial problem of sending data via
> ZeroMQ, from short-lived threads. Performance in many cases would go
> up, not down. We see way too many apps that create/connect a socket
> for every message they send.

> Apart from that I agree that thread safety is a weird thing and only
> worth doing in very specific cases (ZeroMQ contexts and sockets seem
> to be good candidates).

For sockets, I've several times have wanted to integrate with a library that
uses callbacks on an implementation-defined thread (aka, "not mine").  I want
to take the data supplied with the callback and enqueue it to a worker that
uses minimal (preferably no) shared state with the rest of the application.
Since ZeroMQ sockets are not thread safe, I have to build my own queuing
mechanism and either not use ZeroMQ for this part of the application or live
with the complexity of a hybrid solution.
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to