[M3devel] race condition setting act.handle?

Tony Hosking hosking at cs.purdue.edu
Mon Dec 7 18:42:13 CET 2009


On 7 Dec 2009, at 01:55, Jay K wrote:

> pthread_create(act.handle) followed at some point by use of act.handle in the new thread.
>   Or possibly getting on the list of threads in the new thread and then a third thread looking at that list.

Good question.  Previously we had fork inside activeMu, which prevented the forked thread running until the parent release activeMu.  Now we don't.  Perhaps that was the problem.

> 
> 
> What is to cause act.handle to be stored before the new thread starts and uses act.handle?
> 
> 
> For this reason in Win32 I create the thread suspended, store the handle, resume the thread.
> Apparently there is no direct equivalent in pthreads, you have to use your own mutex+condition variable.
> 
>  - Jay
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20091207/a1abbd57/attachment-0002.html>


More information about the M3devel mailing list