Re: Win32 Event vs Conditional variable
- From: llothar <llothar@xxxxxx>
- Date: 25 Apr 2007 07:55:53 -0700
A condition variable is probably the best way to wait for a message to
arrive.
Not on windows, because it has a message queue mechanism already.
Not on unix because you might also wait for a message (file descriptor
event).
My generic app framework (runtime of the eiffel compiler i'm
maintaining) uses
a little bit more complicated mechanism. Depending on the thread -
main thread
always wait on a "semaphore" pipe because this is important for the
GUI's libs
which all run in the main thread and normally only have a mechanism to
wait
on file descriptors - and the events that might occur.
Maybe the world would be better if unix could unify the API's and
allow to wait on a semaphore/condition variable and on a file
descriptor but the API is not as well implemented as the WIndows
Kernel API.
.
- Follow-Ups:
- Re: Win32 Event vs Conditional variable
- From: David Schwartz
- Re: Win32 Event vs Conditional variable
- From: David Schwartz
- Re: Win32 Event vs Conditional variable
- References:
- Win32 Event vs Conditional variable
- From: Roman . Perepelitsa
- Re: Win32 Event vs Conditional variable
- From: llothar
- Re: Win32 Event vs Conditional variable
- From: David Schwartz
- Win32 Event vs Conditional variable
- Prev by Date: Re: pthreads: threads, fork/exec and signals
- Next by Date: Re: Lock-free proxy algorithm
- Previous by thread: Re: Win32 Event vs Conditional variable
- Next by thread: Re: Win32 Event vs Conditional variable
- Index(es):
Relevant Pages
|