On Mon, May 17, 2010 at 10:04 AM, DPX-Infinity <dpx.infinity@gmail.com> wrote:
Hi,
I'm writing a program which listens to some D-Bus signals using
DBus.Client.onSignal function from dbus-client package. This function
runs IO action in separate haskell thread when signal is received. My
program does nothing except signal handling, so after setting up
signals it has to wait indefinitely. Now I'm using not very clean (I
think so) forever $ threadDelay 10000000 . Is there another (I mean,
correct) method to do this thing?

You could ask yourself why you need a child thread if the main thread doesn't do anything else.

I presume you're at a step in the development of something larger and that you'll eventually have a use for the main thread... otherwise the child thread is buying you nothing.

Dave
 
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe