New Bound Threads Proposal

Simon Marlow simonmar at
Mon Apr 28 06:57:48 EDT 2003

> > If true, that gives us the
> > important principle that
> >
> >   At any one time, there is at most one runnable Haskell thread
> >   associated with, or bound to, any given native thread.
> Exactly. I'll make sure it's mentioned somewhere.
> (Also, a Haskell thread cannot be bound to a native thread 
> that already has a different Haskell thread associated with it).

Hmmm - what about the following situation:

  - Haskell thread A is bound to native thread N
  - Haskell thread A makes an FFI call
  - the FFI call invokes a foreign export, creating Haskell thread B
  - Haskell thread B calls threadbound()

at this point A & B are both bound to the same native thread, right?
But only B is runnable (which is why I said only one *runnable* Haskell
thread may be bound to any given native thread, but I see you removed
that word when you added the statement to the document).


More information about the FFI mailing list