[MLton] More on parallelism

Wesley W. Terpstra wesley at terpstra.ca
Tue Dec 5 01:09:49 PST 2006


On Dec 4, 2006, at 9:41 PM, Matthew Fluet wrote:
> 2) Rework the MLton.Thread implementation to make use of multiple  
> OS-level
>    threads.  It is likely that the right framework here is that a  
> runtime
>    option indicates the total number of OS-level threads that one  
> wants,
>    which will be multiplexed among an arbitary number of  
> MLton.Thread's.

Please don't do this.
I think people would want two different Thread interfaces; one for  
"OS" threads and one for the kind that exist now.

>    Alternatively, one could design a MLton.PThread structure that  
> exposes
>    the OS-Level threads.  Here, one would be able to start a new  
> PThread
>    and initialize it with the ML thread of control.  This ML thread of
>    control could set up the signal handler (for preemptive ML  
> threads) and
>    then start pulling ML threads off the shared queue.

Sounds much better.




More information about the MLton mailing list