[M3devel] Win32 threads
Tony Hosking
hosking at cs.purdue.edu
Tue Sep 29 19:54:48 CEST 2009
I believe that the hangs we are seeing are because of the race present
in AlertWait, which permit a thread to miss seeing an alert before
waiting on the condition. We want the thread only to wait if there
has been no alert. Unfortunately, the alert is only protected by the
global mutex, which must be release before waiting. Currently, we
release the mutex, then wait, with the resulting race. This requires
a more complicated handshake than currently implemented. Perhaps
using SignalObjectAndWait instead as well as a Win32 mutex on each
thread. Similarly to ThreadPThread.m3.
Antony Hosking | Associate Professor | Computer Science | Purdue
University
305 N. University Street | West Lafayette | IN 47907 | USA
Office +1 765 494 6001 | Mobile +1 765 427 5484
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20090929/27137d9e/attachment-0001.html>
More information about the M3devel
mailing list