how to implement timeouts for IO operations?
Johannes Waldmann
joe@isun.informatik.uni-leipzig.de
Thu, 19 Apr 2001 10:38:20 +0200 (MET DST)
> timeout n a = parIO (do { r <- a; return (Just r) })
> (do { threadDelay n; return Nothing })
oh, I this looks better (to me) since it doesn't use exceptions!
does parIO kill the `other' thread?
still I don't find parIO (in ghc-4.08), in what module is it?
--
-- Johannes Waldmann ---- http://www.informatik.uni-leipzig.de/~joe/ --
-- joe@informatik.uni-leipzig.de -- phone/fax (+49) 341 9732 204/252 --