darcs patch: forkChild, waitForChild, parIO, timeout

Taral taralx at gmail.com
Wed Nov 8 13:39:19 EST 2006

On 11/8/06, Simon Marlow <simonmarhaskell at gmail.com> wrote:
> Nearly - but this one doesn't nest.  Also, it's possible for the Timeout
> exception to leak.

Okay, nesting could be covered by changing Timeout to Timeout Unique
(or something else equivalent). The exception leaking is impossible to
avoid so long as the application can catch arbitrary exceptions.

You can't have E get the same number for myThreadId without running it
in the main thread. You can't have E run in the main thread without
having to interrupt it with something. The only something that is
currently available is an exception. Any exception could leak because
we allow generic catch.

So there is no "perfect" timeout without an RTS change.

Taral <taralx at gmail.com>
"You can't prove anything."
    -- Gödel's Incompetence Theorem

More information about the Libraries mailing list