From: <mac...@gm...> - 2011-09-02 14:03:35
|
There is indeed a claim in wxHaskell FAQ that it is incompatible with Haskell threads. I have, however, used threads spawned with forkIO to update wxHaskell GUI in toy apps, without any ill effects. Examples: http://mmakowski.com/wiki/tech:haskell_mvc https://github.com/mmakowski/habaz I'd be interested to learn how the incompatibility can manifest itself -- if there indeed is any. Regards, Maciek On Fri, Sep 2, 2011 at 9:41 AM, D.V. <dav...@gm...> wrote: > Bonjour List ! > > I am writing a program that is supposed to listen to a tcp port, and > when a client connects, > update a UI done with wxHaskell. > > Since wxHaskell is not compatible with multiple threads, I am not sure > how to do this. > > an idea I have is to > > - forkOS a thread which will do the network part. > - when a message is sent from a client, write it to a channel > - on the other thread, have a wxHaskell timer check periodically if a > new message is available, update the UI if needed. > > I've tried it and it looks like it's working, but I anyone has some > remark I'm interested. > > David. > > ------------------------------------------------------------------------------ > Special Offer -- Download ArcSight Logger for FREE! > Finally, a world-class log management solution at an even better > price-free! And you'll get a free "Love Thy Logs" t-shirt when you > download Logger. Secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsisghtdev2dev > _______________________________________________ > wxhaskell-users mailing list > wxh...@li... > https://lists.sourceforge.net/lists/listinfo/wxhaskell-users > |