Tim Bauer wrote:
Does anyone know if the new System.Timeout.timeout combinator can wakeup from
System.Process.waitForProcess?
No, this is expected behaviour per the documentation:
"The technique works very well for computations executing inside of the
Haskell runtime system, but it doesn't work at all for non-Haskell code.
Foreign function calls, for example, cannot be timed out with this
combinator simply because an arbitrary C function cannot receive
asynchronous exceptions."
In principle, this FFI restriction could be partly lifted on POSIX
systems, at least for some library calls, by use of thread cancellation.
However, the thread cancellation rules are sufficiently subtle that I
have never heard of anyone actually using this facility. I wouldn't
want to be trying to write or maintain this code, though.
<b
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe