On Tue, Sep 28, 2010 at 1:31 AM, Henry Jen <henry...@ztune.net> wrote:
> OK, I tried this on my OpenSolaris box, and believe I figured out what
> is going on.
>
> The dead-lock happens when the initial one worker thread get into idle
> first as no tasks are pushed yet, then two push comes in. Under this
> circumstance, there is one thread idle, thus no new thread will be
> created.
>
> Now the idle thread get to pick up the first task, but is blocked,
> thus no other thread will pick up the second task, which caused the
> dead-lock.
>
> As explained, this scenario is not supported by design as we expect
> the task should not be blocking. Understood the cooperative approach
> is not optimal, but that is all we needed at that moment and simplify
> things a lot.

Thanks a bunch for looking!

Reply via email to