
24 Jan
2014
24 Jan
'14
1:38 a.m.
Simon Marlow
And what about this one:
main = do forkIO $ runGhc libdir $ do ... forkIO $ runGhc libdir $ do ...
The problem with this is the RTS linker, which is a single piece of shared global state. We could actually fix that if it became important. If you’re not running interpreted code, this should be fine (apart from the static flags issue mentioned above).
I’m curious, what is the issue with interpreted code? Does the interpreter store interpreter state in the RTS, which would get mixed up between the two instances? If so, wouldn’t the same thing happen if I use forkIO in interpreted code? Manuel