[Haskell-cafe] Re: FFI and callbacks

John Goerzen jgoerzen at complete.org
Mon Jul 25 11:08:26 EDT 2005


On Mon, Jul 25, 2005 at 04:05:15PM +0100, Duncan Coutts wrote:
> On Mon, 2005-07-25 at 13:47 +0000, John Goerzen wrote:
> > >  - our "bound threads" design does not require the implementation
> > >    to support lightweight threads, and hence doesn't let the
> > >    programmer take advantage of them.
> > 
> > In my particular case, the C library isn't aware of threading at all.
> > While it may be safe to call it from any arbitrary Haskell thread, it
> > would not be safe to call it from two threads simultaneously.
> 
> That's ok. Without the threaded rts, you get just one OS thread being
> used to make the foreign calls.

Right, but let's say I do want to use the threaded RTS so I can use
multiple OS threads; what should I be doing here?

(Thanks also for the blog link; I'll take a look)


More information about the Haskell-Cafe mailing list