Hi Andy,

On Sat, Oct 09, 2010 at 05:06:57PM +0800, Andy Stewart wrote:
> just need figure out why it can't work when disable "-thread" flag.

Hum ... got some sleep and I've re-read the GHC documentation on
[0]. They say "It is a common misconception that you need to use
forkOS instead of forkIO to avoid blocking all the Haskell
threads when making a foreign call; this isn't the case. To allow
foreign calls to be made without blocking all the Haskell threads
(with GHC), it is only necessary to use the -threaded option when
linking your program, and to make sure the foreign import is not
marked unsafe."

[0]:
http://www.haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/Control-Concurrent.html#v%3AforkOS

Does that mean calling `mainGUI` in a program build without
'-threaded' blocks all the GHC runtime threads, including the
garbage collector ?

/John

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to