<br><br><div class="gmail_quote">On Mon, May 17, 2010 at 10:04 AM, DPX-Infinity <span dir="ltr">&lt;<a href="mailto:dpx.infinity@gmail.com">dpx.infinity@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
I&#39;m writing a program which listens to some D-Bus signals using<br>
DBus.Client.onSignal function from dbus-client package. This function<br>
runs IO action in separate haskell thread when signal is received. My<br>
program does nothing except signal handling, so after setting up<br>
signals it has to wait indefinitely. Now I&#39;m using not very clean (I<br>
think so) forever $ threadDelay 10000000 . Is there another (I mean,<br>
correct) method to do this thing?<br></blockquote><div><br></div><div>You could ask yourself why you need a child thread if the main thread doesn&#39;t do anything else.</div><div><br></div><div>I presume you&#39;re at a step in the development of something larger and that you&#39;ll eventually have a use for the main thread... otherwise the child thread is buying you nothing.</div>
<div><br></div><div>Dave</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br>