apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@xbc.nu>
Subject Re: locks/win32/thread_cond.c
Date Tue, 01 Jun 2004 21:54:48 GMT
Klaus Keppler wrote:

> Hello Ryan,
>>> b. In apr_thread_cond[_timed]_wait cond->mutex and mutex are reset
>>>   multiple times, why?
>> I don't know.  I'll need to dig into this.
> Recently I wrote a multithreaded application and tested it with
> heavy load under both linux and windows.
> The proposed patch (bugzilla #27654) takes care of releasing
> the mutex (given by parameter) only once; without the "unlock_once"
> workaround the apr_thread_cond_(timed)wait function ran into a
> deadlock situation after some loops.

We shouldn't be writing patches for the Win32 thread_cond code. We
should start from scratch, correctly. The current code has so many race
conditions it's not even funny. My apologies to the authors, but it
really is naive.

I've been sort of working on this...procrastinating really...for a while
now. I'll definitely have a go at dusting off and committing what I have

Brane ─îibej   <brane@xbc.nu>   http://www.xbc.nu/brane/

View raw message