[M3devel] concurrency
Jay K
jay.krell at cornell.edu
Wed Jul 6 18:47:26 CEST 2011
> cvsup is badly behaved with respect to POSIX semantics for fork and threads. It still needs to be fixed rather than making M3 threads support its bad behavior.
For which "threads"?
It doesn't use pthreads directly.
Where are the Modula-3 threads + fork semantics spelled out? I suspect nowhere.
> getting pthreads to stop reliably is difficult on some operating systems (BSD derivatives appear to be bad at this, but Windows, Linux and OSX seem to function well enough).
I'm nervous about SuspendThread + GetThreadContext esp. on Win32-on-Win64.
- I don't understand how in general preemtive thread suspension can/does work on any multi-processor system, not just Windows.
- This lots of online discussion about GetThreadContext not returning what code expects.
> The best way to get M3 threads to play nicely on all OS would be to avoid thread stopping mechanisms that expect cooperation from the OS and
> simply to use explicit polling inserted by the compiler at calls and backward branches to decide if the thread should suspend itself.
I like this, as it would remove a fair amount of target-specific code.
- Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20110706/465dcecd/attachment-0002.html>
More information about the M3devel
mailing list