[Haskell-cafe] How to ensure code executes in the context of a specific OS thread?

Jason Dagit dagitj at gmail.com
Tue Jul 5 22:04:37 CEST 2011


On Tue, Jul 5, 2011 at 12:33 PM, Ian Lynagh <igloo at earth.li> wrote:
> On Tue, Jul 05, 2011 at 08:11:21PM +0100, Simon Marlow wrote:
>>
>> In GHCi it's a different matter, because the main thread is running
>> GHCi itself, and all the expressions/statements typed at the prompt
>> are run in forkIO'd threads (a new one for each statement, in fact).
>> If you want a way to run command-line operations in the main thread,
>> please submit a feature request.  I'm not sure it can be done, but
>> I'll look into it.
>
> We already have a way: -fno-ghci-sandbox

I've removed all my explicit attempts to forkIO/forkOS and passed the
command line flag you mention.  I just tried this but it doesn't
change the behavior in my example.

Jason



More information about the Haskell-Cafe mailing list