
On 15/10/2012 09:47, Michael Snoyman wrote:
With the program at the end of this email, I would expect that, once per second, I would get a message printed from each forkIO'd green thread, the forked process, and the master process. And if I spawn 8 or less child threads that's precisely what happens. However, as soon as I up that number to 9, the child process is never run. The process is, however, created, as can be confirmed by looking at the process table.
FWIW I can reproduce this problem. The strace in both cases is very
different. In the non threaded runtime, everything works as you expect:
7519 select(2, [], [1], NULL, {0, 0}) = 1 (out [1], left {0, 0})
7519 write(1, "starting child\n", 15) = 15
7519 select(2, [], [1], NULL, {0, 0}) = 1 (out [1], left {0, 0})
7519 write(1, "(7519,\"child\",0)\n", 17) = 17
7519 timer_settime(0x3, 0, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
7519 select(0, [], [], NULL, {0, 999994}