[concurrency-interest] Re: Backport condition variables and
dawidk at mathcs.emory.edu
Thu Aug 11 15:47:21 EDT 2005
Maciej Szefler wrote:
>Great job with the backport, its a life saver. However, I have recently
>run into a problem. It seems that the condition variables do not work as
>advertised with reentrant locks. I find that if a thread has multiple
>holds on a reentrant lock a conditional variable await() call will only
>release one of those holds. This is contrary to expectations (at least
>mine and the JavaDoc author's).
You are right. This is a bug. Conditional variables in the backport were
derived from dl.util.concurrent.CondVar, which was POSIX-style
condition, supposed to work with non-reentrant mutexes. It should be
easy to fix; I will include the fix in the next release (probably 2-3
weeks from now).
More information about the Concurrency-interest