ghc rts selection and third party libraries

Krzysztof Skrzętnicki gtener at
Mon Feb 1 04:53:16 EST 2010

Perhaps rtsSupportsBoundThreads can help:

Best regards

Krzysztof Skrzętnicki

On Mon, Feb 1, 2010 at 06:33, John Lask <jvlask at> wrote:
> Hello
> I hope someone can provide some guidance on how I can solve a certain
> problem.
> I have a library that taps into the ghc c rts: specifically when the rts is
> single threaded I am pumping events in via: stg_pending_events, when the
> threaded rts is used I use sendIOManagerEvent.
> i.e. I have two versions of the library with the same api. The problem with
> this is that either library is only good for one context: either threaded
> rts or not, and the user needs to select the appropriate library to use
> depending on the use context.
> What I want to be able to do is to have ghc automatically select the
> compiled library version to link in depending on the which rts option is
> selected: "-thread" or not
> does any one have any ideas?
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at

More information about the Glasgow-haskell-users mailing list