It's a matter of perspective. Either the function you're FFI'ing to is safe/unsafe or your use of it is safe/unsafe. The FFI spec seems to be using the former, so if you think that the function you're calling is unsafe (i.e., can call back into Haskell) then it blocks the world.
Hey everyone,
Could someone explain to me the logic behind having "unsafe" calls block
other threads from executing? It seems to me that if anything it would
make more sense for "safe" calls to block other threads since the call
can call back into the Haskell runtime, as opposed to "unsafe" calls
which (by assertion) will never call back into Haskell and therefore
should be safer to run in parallel with other threads. What am I
missing here?
Cheers,
Greg
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe