[Haskell-cafe] forkProcess, forkIO, and multithreaded runtime
Brandon Allbery
allbery.b at gmail.com
Mon Oct 15 18:48:56 CEST 2012
On Mon, Oct 15, 2012 at 12:30 PM, Joey Hess <joey at kitenet.net> wrote:
> forkProcess comes with a giant warning: since any other running threads
> are not copied into the child process, it's easy to go wrong: e.g. by
> accessing some shared resource that was held by another thread in the
> parent.
>
> In my experience, forkProcess often behaves incomprehensibly (to me)
> with -threaded, typically resulting in a forked process hanging, and
> quite often only some small percentage of the time, which makes it
> really hard to track down and try to diagnose what thunk might not be
> getting forced until after the fork, or whatever.
>
The forkProcess MissingH discussion recently left me feeling like this is
going to be triggered in all cases, because it sounds like one of the
problematic threads is the I/O manager's thread?
--
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix/linux, openafs, kerberos, infrastructure http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20121015/1f245a56/attachment.htm>
More information about the Haskell-Cafe
mailing list