On Thu, Jun 4, 2009 at 1:48 PM, Ryan Culpepper <span dir="ltr"><<a href="mailto:ryanc@ccs.neu.edu">ryanc@ccs.neu.edu</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><br></div>It's easiest if you've already created a main function that starts all the work. Suppose it's called 'run-simulation'. Then instead of something like this<br>
<br>
(run-simulation some-arguments)<br>
<br>
to start it in a new thread, write this instead:<br>
<br>
(thread (lambda () (run-simulation some-arguments)))<br>
<br>
There are some distantly related examples of threads in "More: Systems Programming with PLT Scheme" in the help desk:<br>
<br>
<a href="http://docs.plt-scheme.org/more/" target="_blank">http://docs.plt-scheme.org/more/</a><br><font color="#888888">
<br>
Ryan<br>
</font></blockquote></div><br>Thank you very much for that! After RTFM, I found it there as well: <a href="http://docs.plt-scheme.org/reference/threads.html#(part._.Creating_.Threads)">http://docs.plt-scheme.org/reference/threads.html#(part._.Creating_.Threads)</a><br>
<br>
I've attached a version of gears.ss which allows you to do things like this at the REPL:<br>
<br>
(send c move-left)<br>
(send c run)<br>
<br>
Regards,<br>
Greg<br>
<br>