[MLton] cvs commit: MAIL: Initial port of CML from SML/NJ to
Sun, 2 May 2004 17:33:36 -0700
> > Since the blockFns need to do this so that they can put
> > their thread in some appropriate queue, the only way out I can see
> > would be to change the type of the queues that are involved to be
> > queues of thunks that return threads instead of queues of threads.
> Yeah, when I first encountered this problem, I thought something along
> these lines might work.
> Now that things are working and I'm more comfortable with how things are
> put together, I'll come back and try this approach at some point.
> Certainly, a few more thunks would be cheaper than more threads.
Yeah, my rule of thumb is an order of magnitude difference between
threads and functions. We can certainly make threads better with more
work and inlining Thread_switch, but never as fast as functions.