apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@gmail.com>
Subject Re: [PATCH] PR 49709 apr_thread_pool race condition caused by use of separate mutexes?
Date Tue, 28 Sep 2010 10:30:14 GMT
On Tue, Sep 28, 2010 at 1:31 AM, Henry Jen <henryjen@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!

View raw message