[Haskell-cafe] Thread-safe GHC

12 views
Skip to first unread message

Corentin Dupont

unread,
Aug 31, 2015, 9:18:31 AM8/31/15
to haskell, ghc-...@haskell.org

Hello,
I am wondering if GHC itself is thread-safe.
I am using Hint, and it reports that GHC is not thread-safe, and that I can't safely run two instances of the interpreter simultaneously.
Is that still the case?
Thanks!
Corentin



---------- Forwarded message ----------
From: Daniel Gorín <jcpet...@gmail.com>
Date: Thu, Aug 27, 2015 at 5:09 PM
Subject: Re: Thread-safe Hint
To: Corentin Dupont <corenti...@gmail.com>


Hi Corentin,

sorry for the late reply. Until relatively recently, the problem was still on. But I too remember seeing something related to this issue being fixed (iirc, the problem was the runtime linker, which used global state), so perhaps it is already fixed in 7.10. If you can verify this, it shouldn’t be hard to show the error message only on old versions of ghc. I’ll be away for a couple of weeks, but if you want to look into this and send a patch, I’ll merge it when I return.

Cheers,
Daniel

> On 24 Aug 2015, at 10:43 am, Corentin Dupont <corenti...@gmail.com> wrote:
>
> Hello Daniel,
> I noticed the following message in Hint:
> This version of GHC is not thread-safe,can't safely run two instances of the interpreter simultaneously.
>
> Is it still the case with recent versions of GHC?
> It would be neat to be able to launch several instances of the interpreter. In my game Nomyx I have several "match-up" going on and having one instance of the interpreter would be nicer. Otherwise I am obliged to reset the interpret each time I want to interpret something, which is time consuming (2-3 seconds).
>
> Thanks,
> C



Reply all
Reply to author
Forward
0 new messages