Dear All, With this patch Yi is compiled with threaded RTS. The reason is that the lightweight Haskell threads doesn't work very well when the main thread is busy with the GTK main loop. Instead of forkIO we should use forkOS. The problem with the latest is that this requires synchronization between the worker thread and the main thread. In gtk2hs there is a postGUIAsync function that does the trick for us. Fortunately the only way for comunication between the editor and the user interface are the functions in Yi.UI.Common. They all are wrapped with postGUIAsync now.
This works for me but it is important to check whether this works with the other frontends. If the VTY and Cocoa are also single-threaded then they also have to be synchronized. For now I am using the OS threads in shim for background compilation and it works perfect. Best Regards, Krasimir On Apr 18, 1:47 pm, Krasimir Angelov <[EMAIL PROTECTED]> wrote: > Fri Apr 18 06:53:41 EDT 2008 [EMAIL PROTECTED] > * use -threaded and OS threads in Yi > > M ./HConf.hs -1 +1 > M ./Yi/UI/Gtk.hs -7 +7 > M ./yi.cabal -1 +1 > > View patch online: > > http://code.haskell.org/yi/_darcs/patches/20080418105341-ae14a-b0ed7e... --~--~---------~--~----~------------~-------~--~----~ Yi development mailing list [email protected] http://groups.google.com/group/yi-devel -~----------~----~----~----~------~----~------~--~---
