[plt-scheme] FFI + errno
On Thu, Dec 10, 2009 at 4:20 AM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> At Wed, 9 Dec 2009 19:53:01 -0800, YC wrote:
> > Perhaps a system thread can be instantiated and exposed via FFI so the
> FFI
> > call can live on a separate thread from the vm's main thread?
>
> I think users of the FFI probably need more control over which thread
> is used for calling a foreign function.
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.
(define st (system-thread ffi-thunk))
(system-thread-send st ...)
(system-thread-suspend st)
(system-thread-resume st)
...
Just some additional thoughts. If it works differently that's fine too.
Cheers,
yc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20091210/e0ca6706/attachment.html>