<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
> 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.<BR>
 <BR>
  For which "threads"?  <BR>
  It doesn't use pthreads directly.  <BR>
  Where are the Modula-3 threads + fork semantics spelled out? I suspect nowhere.  <BR>
 <BR>
<BR> > 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). <BR>
 <BR>
I'm nervous about SuspendThread + GetThreadContext esp. on Win32-on-Win64.<BR>
  - I don't understand how in general preemtive thread suspension can/does work on any multi-processor system, not just Windows.<BR>
  - This lots of online discussion about GetThreadContext not returning what code expects.<BR>
 <BR>
 <BR>
 > 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 <BR>
 > simply to use explicit polling inserted by the compiler at calls and backward branches to decide if the thread should suspend itself. <BR>
 <BR>
 <BR>
I like this, as it would remove a fair amount of target-specific code.<BR>
 <BR>
 <BR>
 - Jay<BR>                                     </div></body>
</html>