-
Notifications
You must be signed in to change notification settings - Fork 89
Description
Hi all!
I hope that this is the right place to ask such a question.
I try to parallize parts of a program of mine, but get a strange runtime error and as far as I know it is related to something in the process package.
In my tool, I get some specific input, build a constraint from it which can be solved in 3 different ways (3 solvers; involving external tools).
Thus I would like to run these three different solvers on the constraint in parallel and return the result of the fastest one.
In simple words it looks as follows:
A solver s has a type s :: constraint -> IO [a] and I apply the constraint to all solvers to get a list of possible solutions [IO [a]]. After that I call async 0 on them and wait with waitAny for a result (if I find a correct result, i.e. a non-empty list is returned, then I kill all the other jobs with cancel). Within a solver external tools are called with readProcess and readProcessWithExitCode. The problem is that I get quite often the following runtime error waitForProcess: does not exist (No child processes).
-
Is mixing
asyncandprocesscausing this? -
Is this related to something similar as 1?
-
Does anybody has an idea what could cause this?
In the meantime I replaced the async package functions completely by forkIO etc., but still this exception occurs.
However, I never experienced this exception before I parallelized my program.
Thank you very much and cheers!