Proposal: System.Timeout module for base

Einar Karttunen ekarttun at cs.helsinki.fi
Mon Jan 29 17:29:27 EST 2007


On 28.01 17:21, Peter Simons wrote:
> 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.
>

Yes, this is the case. Of course one can also write timeout
combinators that work even if the blocking call is a FFI one.

Maybe have two variants since the safer one is slightly slower.

- Einar Karttunen


More information about the Libraries mailing list