[M3devel] pthread_join?

Jay K jay.krell at cornell.edu
Mon Aug 1 09:31:52 CEST 2016

Should we use pthread_join?

"it is a convenience and you can do X"
And we do that X.
I ask for one or two reasons.
In making ThreadWin32.m3 resemble ThreadPThread.m3 more, there is usually no loss of efficiency.However this is an area where I percieve, just from the design/implementation, some loss.
So, wondering..I noticed pthread_join exists.
I suspect if we used pthread_join, then both Win32 could still resemble pthread, but regain the efficiency.In particular, so that multiple independent joins do not contend on the same mutex.
Is there the problem of:
" Joining with a thread that has previously been joined results in       undefined behavior."
yes we want it to be well defined to raise an exception?Thoughts?
 - Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20160801/94b8cba3/attachment-0002.html>

More information about the M3devel mailing list