
27 Sep
2003
27 Sep
'03
8:23 a.m.
Hi, I'd like to use a C-library which calls back into the haskell program, potentially from different threads at the same time. That is, the following calling sequence takes place: (haskell) Calls C via foreign import. (c) Creates threads, which in turn calls back into haskell via foreign exported functions. Is this supported in ghc? Some simple tests suggests that it does work, at least I don't get any crashes, if ghc is compiled with --enable-threaded-rts. But is this intended to work or am I just lucky? /Peter