[M3devel] modula-3/pthreads

Tony Hosking hosking at cs.purdue.edu
Mon May 19 13:16:23 CEST 2008


Jay,

Indeed, I originally tried something slightly thinner (see the logs  
for the gory evolution...) but it only happened to work with Linux  
threads.  What we have now is about as thin as it can be, given the  
constraints imposed by the need to schedule thread alerts, etc.  For  
example, on some systems one cannot reliably wake up a specific thread  
from among many that are waiting on a condition.  Hence the need for  
every M3 thread too have its own private condition variable on which  
it will park itself pending alerts and conditions.


-- Tony

On May 18, 2008, at 2:54 PM, Jay wrote:

> Given that pthreads has all of mutex, rwlock, and most importantly  
> condition variables, couldn't ThreadPThread.m3 be very much thinner?
> Like, not do any of its own scheduling?
>
> Also, shouldn;t the attr for stack size be destroyed? Else leak on  
> some platforms? Is it even needed at all?
>
>  - Jay

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


More information about the M3devel mailing list