Burkhard Carstens wrote:
Am Montag, 24. Juli 2006 17:27 schrieb Vinzent Hoefler:

- the rtlEvent works even with timeout (with my patch posted on
mantis), but this one clears the signaled state, when wait is
called.
>>
*oh* Before the wait? That's not good. This cries for race conditions
and subtle deadlock situations.

thread synchronization uses this and takes care of it by calling RTLeventstartwait which locks the associated mutex.

As far as I just read code and comments, it does it for Windows to get Unix behaviour, although I don't see the point here, because this just forces the race condition the POSIX-Threads implementation actually tries to circumvent with this associated mutex.

I'm not even sure, if Unix actually clears the event. The man-pages don't seem to indicate so.


Vinzent.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to