<br><br>
<div class="gmail_quote">On Thu, Dec 10, 2009 at 4:20 AM, Matthew Flatt <span dir="ltr"><<a href="mailto:mflatt@cs.utah.edu" target="_blank">mflatt@cs.utah.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>At Wed, 9 Dec 2009 19:53:01 -0800, YC wrote:<br>> Perhaps a system thread can be instantiated and exposed via FFI so the FFI<br>> call can live on a separate thread from the vm's main thread?<br><br></div>
I think users of the FFI probably need more control over which thread<br>is used for calling a foreign function.</blockquote>
<div> </div>
<div>Agreed - it would be nice to have an interface similiar to `thread` where one can instantiate and manipulate a system thread explicitly, and then pass the thunk that wraps the FFI calls into it.</div>
<div> </div>
<div>(define st (system-thread ffi-thunk))</div>
<div>(system-thread-send st ...)</div>
<div>(system-thread-suspend st)</div>
<div>(system-thread-resume st) </div>
<div>... </div>
<div> </div>
<div>Just some additional thoughts. If it works differently that's fine too. Cheers,</div>
<div>yc</div>
<div> </div></div>