6 Jul 2011 13:23
Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?
John Lato <jwlato <at> gmail.com>
2011-07-06 11:23:36 GMT
2011-07-06 11:23:36 GMT
Message: 23
Date: Wed, 06 Jul 2011 10:14:56 +0100
From: Simon Marlow <marlowsd <at> gmail.com>
Subject: Re: [Haskell-cafe] How to ensure code executes in the context
of a specific OS thread?
To: Jason Dagit <dagitj <at> gmail.com>, cvs-ghc <at> haskell.org, Haskell Cafe
<haskell-cafe <at> haskell.org>
Message-ID: <4E142790.8090009 <at> gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 05/07/2011 20:33, Ian Lynagh 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
Aha, I'd forgotten about that! Thanks Ian.
Simon
IIRC a lot of people have had trouble running GUI apps from within GHCi on OS X, whether they're GLUT, Gtk2hs, WxHaskell, or native, and several users consider this a large obstacle. I know that I haven't been successful with gtk2hs. However, at this suggestion I just tried running a gtk2hs app I'm developing with the -fno-ghci-sandbox flag, and it worked perfectly.
Thanks very much, Ian.
John L.
------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________ Gtk2hs-users mailing list Gtk2hs-users <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtk2hs-users
RSS Feed