apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48722] apr_thread_pool_push may not create a new thread when necessary
Date Tue, 28 Sep 2010 10:54:46 GMT

--- Comment #3 from Jeff Trawick <trawick@apache.org> 2010-09-28 06:54:42 EDT ---
1. the testcase
seems to work as you expect on Mac OS X (often deadlocks before 100th
iteration) but crashes for me on Linux, either with the released apr-util 1.3.9
or the current level of code
2. expectations of apr_thread_pool
The original author offered this summary of expectations on the list:
------cut here------
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

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

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.
-------cut here------

Have a look at the discussion thread starting with


Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org

View raw message