Using the ghc-api to run more than one instance of ghc
marco-oweber at gmx.de
Mon Jul 13 16:53:31 EDT 2009
> Yes, it is a known limitation. It ought to be documented somewhere.
> There are two problems:
> 1. GHC is not thread-safe. There are some items of global state (the
> NameCache and the PackageInterfaceTable) that should be protected.
> It's not a trivial matter to do this - we had a hacky solution for
> the parallel compilation experiment we did a while back, but it
> wasn't finished.
> You could workaround this by using a mutex and only invoking GHC
> API operations in one thread at a time.
> 2. There is only one RTS linker with a single symbol table. This is
> the problem you ran into. There's no workaround that I'm aware
Are there already bug tracker items for these two problems?
I've tried finding them but didn't succeed. This would be a fast way to
document this issue even if its unlikely to be fixed soon.
More information about the Glasgow-haskell-users