simonpj at microsoft.com
Fri Mar 7 08:40:21 EST 2003
| First let me outline my current understanding of what 'bound' means.
| Consider the following scenario:
| Haskell program is running in OS thread 't1'
| Haskell program calls C function 'foo'.
| 'foo' forks a new OS thread 't2'.
| In parallel: 't1' calls Haskell function 'f1' and
| 't2' calls Haskell function 'f2'
| 'f1' calls C function 'g1'
| 'f2' calls C function 'g2'
| My understanding is that 'bound' requires that 'g1' be executed by
| thread 't1' and that 'g2' be executed by thread 't2'.
You didn't say where the program mentions 'bound'!
I tried very hard to give a precise description of what bound threads
are, in haskell-report/ffi/threads.tex. (Wolfgang circulated a PDF
recently.) Does that specification make sense? Does it answer your
question? (If not, we should improve it.)
I'm sure it would be improved by examples -- would you like to add one?
More information about the FFI