
Hello, Two independent questions/remarks: 1. 'isEmptyChan x' blocks if x is empty and some other thread is waiting to read from x: Prelude Control.Concurrent> x <- newChan Prelude Control.Concurrent> forkIO $ readChan x Prelude Control.Concurrent> empty <- isEmptyChan x *** Exception: thread blocked indefinitely Is that the intended behaviour? Is it possible to make a non-blocking version? 2. System.Posix.Signals does not export anything on my windows installation: Prelude System.Posix.Signals> :b System.Posix.Signals Prelude System.Posix.Signals> I wanted to include 'installHandler sigPIPE Ignore Nothing' (as mentioned in the documentation of the Network module) in my program to make it more portable. Perhaps 'installHandler' could be set to a constant 'return ()' on windows? My GHC version is 6.2. (Please let me apologise in advance in case (some of) these issues have changed since 6.2.) Regards, Arie Peterson

In local.glasgow-haskell-users, you wrote:
1. 'isEmptyChan x' blocks if x is empty and some other thread is waiting to read from x:
Prelude Control.Concurrent> x <- newChan Prelude Control.Concurrent> forkIO $ readChan x Prelude Control.Concurrent> empty <- isEmptyChan x *** Exception: thread blocked indefinitely
Is that the intended behaviour? Is it possible to make a non-blocking version?
This is a known limitation. Search the mailinglist-archives for a proposed fix. -- http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME L-Attriwutgrammatik
participants (2)
-
ariep@xs4all.nl
-
Volker Stolz