[MLton] interrupted system call

Matthew Fluet fluet@cs.cornell.edu
Mon, 22 Aug 2005 14:14:17 -0400 (EDT)


> I would like to just confirm that all blocking system calls, in a 
> multi-threaded MLton compiled program, will infact yield an interrupted 
> system call exception upon context switching to a new thread due to timer 
> interupts?

Actually, we should be doing the opposite.  See the discussion at the 
bottom of
   http://mlton.org/MLtonSignal

You should, be default, not see exceptions from interrupted system calls; 
instead, the system calls will be silently restarted when the thread is 
resumed.

> I am mainly interested in socket calls. This is the behavoir I 
> observe when one thread atempts to read from a socket, blocks, and then the 
> program attempts to context switch to another thread.

That isn't the behavior I would expect from our stated philosophy on the 
web-page above.  Could you post the code that is yielding this behavior?