[zeromq-dev] Is it possible to get deadlocks in ZeroMQ applications?
A. Mark
gougolith at gmail.com
Mon Apr 8 18:52:56 CEST 2013
Yes I agree, I've not had a single deadlock in a classic sense since using
message queues. But this statement is like saying I've hand not a car
accident since I've been riding a bike. You can still lock up your code but
it will not be a classic deadlock. I guess you could incorrectly code
something with message queues and have it lock up occasionally.
On Mon, Apr 8, 2013 at 9:32 AM, Pieter Hintjens <ph at imatix.com> wrote:
> On Mon, Apr 8, 2013 at 6:26 PM, Michael Powell <mwpowellhtx at gmail.com>
> wrote:
>
> > 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.
>
> Except the context provides atomic resources. There's no way to
> deadlock two tasks via the context.
>
> I can make a deadlockable design but it's extremely artificial. Two
> threads, each waiting on a specific message only the other can
> produce. It hardly qualifies as a deadlock. I can get the same with a
> single task that just sleeps forever...
>
> I'll make this claim: the classic deadlock is impossible when you use
> message-based tasks that don't share any state.
>
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130408/ce63df92/attachment.htm>
More information about the zeromq-dev
mailing list