apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From malc <m...@pulsesoft.com>
Subject Re: [PATCH] RESEND: fixing condvar bug under WIN32
Date Mon, 30 Aug 2004 19:23:19 GMT
On Mon, 30 Aug 2004, Bill Stoddard wrote:

> Gah, this 'little' project isn't so little :-)
>
> Should apr_thread_cond_* have the same semantics as the posix pthread_cond_* routines?
 If the answer is yes,
> then the Win32 implementation is going to be nasty (maybe nastier than it already is)
and the performance is
> going to be rather bad ('rather bad' will prove to be a gross understatment I predict).
 It would be pretty
> easy (?) to whip out something based on Windows IO Completion Ports and the performance
would be quite good,
> but IOCPs dispatch blocked threads in LIFO order and that means that some blocked threads
may never be
> dispatched and broadcasting to all threads to wake up simply will not work reliably.
 I'm unlikely to have
> time to implement a solid posix like apr_thread_cond_* for windows... :-(

This is doable without IO Completion Ports, at least pthreads-win32 does
it. Hard yes, impossible with standard Win32 Events(the way it is
implemented now) - most likely, impossible at all (ubearably slow) - hardly.

-- 
mailto:malc@pulsesoft.com

Mime
View raw message