Jeremy Shaw wrote:
import Control.Concurrent import Control.Concurrent.MVar import System.Posix.Typesdata RW = Read | Write threadWaitReadWrite :: Fd -> IO RW threadWaitReadWrite fd = do m <- newEmptyMVar rid <- forkIO $ threadWaitRead fd >> putMVar m Read wid <- forkIO $ threadWaitWrite fd >> putMVar m Write r <- takeMVar m killThread rid killThread wid return r
Initial testing seems promising. I haven't been able to provoke the "leak" during 15-20 minutes of testing.
I'll test more thoroughly during the weekend. Cheers, _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
