On Fri, Jul 13, 2012 at 2:26 PM, Joey Hess <j...@kitenet.net> wrote:
> Are there any common gotchas with converting to the threaded runtime
> that might provide a hint to what's wrong? My code does not currently
> use Control.Concurrent or threads, although it does use some libraries
> like MissingH that use forkIO or forkOS.

Off the top of my head, I'm not aware of any (non-Windows-related)
gotchas with using -threaded.  However, some functions in MissingH
(e.g. in System.Cmd.Utils) call forkProcess.  To quote the
documentation of forkProcess [1]:

---
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.
---

Perhaps the forked process is inheriting an interleaved computation
that tries to use resources in the parent process.

 [1]: 
http://hackage.haskell.org/packages/archive/unix/latest/doc/html/System-Posix-Process.html#v:forkProcess

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to