<div class="gmail_quote">On Tue, Aug 4, 2009 at 7:47 AM, Michael Norrish <span dir="ltr"><<a href="mailto:Michael.Norrish@nicta.com.au">Michael.Norrish@nicta.com.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
In Moscow ML, I did some magic to get SIGINT recognised as an Interrupt exception, and did<br>
lexer() handle Interrupt => lexer()<br></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>In MLton, I'm confused.<br>
<br>
I can handle SIGINT with MLton.Signal.setHandler, but it seems as if I am going to have to explicitly set myself up with a master thread that repeatedly creates slave threads to run lexer(). Then in the handler, I can just switch to the master, leaving the interrupted slave to expire through lack of attention.</blockquote>
<br></div>Sounds like a reasonable approach. There is no way to raise an exception in one thread from another, so you cannot interrupt the running lexer.<br><br>