Re: Win32 Event vs Conditional variable




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.



.



Relevant Pages

  • Re: Setting the length of a file
    ... I want my code to work in both Unix and Windows; ... _fileno- returns the file descriptor of an open stream. ... _chsize- changes the size of an open file, given a file descriptor. ...
    (comp.lang.c)
  • Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP
    ... one free from another one is trouble everywhere), but on windows: ... libraries in one process on UNIX, but it's obviously quite possible on ... windows (file descriptor: AFAIK, a file descriptor as returned from ...
    (comp.lang.python)
  • Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP
    ... one free from another one is trouble everywhere), but on windows: ... libraries in one process on UNIX, but it's obviously quite possible on ... windows (file descriptor: AFAIK, a file descriptor as returned from ... ..net developer, or any developer that sticks to managed code, be it ...
    (comp.lang.python)
  • Re: _lseek (fd, 0, SEEK_SET) has been aborted
    ... Alex Vinokur wrote: ... On Unix perhaps, but not on Windows. ... concept of file descriptor at all (there are file handles, ...
    (microsoft.public.vc.language)
  • Re: What is the more popular UNIX flavor?
    ... about my experience with Solaris and Cygwin. ... installing packages. ... needing eg tftp you only need to activate on a Unix system. ... probably need installing first on the equivalent Windows system. ...
    (comp.unix.questions)