Proposal: System.Timeout module for base

Peter Simons simons at cryp.to
Sun Jan 28 11:21:28 EST 2007


Hi Einar,

 > This seems broken on GHC with FFI. The thread gets blocked on
 > a FFI call that blocks forever and thus the timeout exception
 > is not delivered - if I remember things correctly.

I am sorry, but I'm uncertain whether I understand your
explanation correctly. The problem you describe seems to be that
the to-be-timed-out thread blocks because of an FFI call and thus
cannot be interrupted when the timeout occurs. Is this what you
were saying? If it is, I'm wondering whether that behavior is
something that should be credited to the timeout function. In
other words, I don't feel that timeout is broken because a
blocked FFI call can't receive exceptions. It is, however, a
limitation that should be documented.

Best regards,
Peter



More information about the Libraries mailing list