On Mon, Apr 8, 2013 at 10:58 AM, Pieter Hintjens <[email protected]> wrote:
> On Mon, Apr 8, 2013 at 12:31 PM, crocket <[email protected]> wrote: > > > However, according to one of my IRC fellows, deadlock is a structural > > problem independent of any kind of lock. > > This is correct. > > > If two ZeroMQ threads waited for each other to finish a task, there > would be > > a deadlock. > This is where folks are getting hung up. The answers have been quite dodgy on the topic until now: > Yes, in theory. However in practice a deadlock is when both tasks need > resources A and B, and one task gets A and waits for B, and one gets B > and waits for A. In ZeroMQ, tasks share nothing, so they cannot get > half a resource. > If I understand it correctly, the thing that is blocked is the Context, which needs to be protected. There's no getting around this brutal fact. Should be fairly simple to self-contain in an ACID'ic if SOLID manner, however. > You would have to be quite creative to create two tasks that were > waiting on each other for messages. > > -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
