[Haskell-cafe] Compiling Setup.hs with -threaded
allbery.b at gmail.com
Thu Jan 29 23:12:20 UTC 2015
On Thu, Jan 29, 2015 at 5:59 PM, Michael Orlitzky <michael at orlitzky.com>
> and we want to run its test suite. Basically:
> * If you run the test suite using runghc, then it works fine.
> * If you compile Setup.hs to setup, then the test suite hangs.
> * But if you compile Setup.hs to setup using -threaded, it works?
IIRC bytecode (runghc, ghci) always uses the threaded runtime, and this
problem can be a symptom of an FFI call that can block but wasn't declared
as potentially blocking; so the runtime calls it expecting it to not block
and the program freezes when it does block. In the threaded runtime, other
OS threads can continue executing in this case; in the non-threaded
runtime, this will block the "green" thread scheduler.
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe