Proposal: System.Timeout module for base (Trac #980)

Bayley, Alistair Alistair_Bayley at
Thu Mar 1 07:05:17 EST 2007

> >   2. call waitForProcess; when it completes, kill the other 
> thread(s)
> does this work? In GHC docs for killThread/throwTo it says:
> > If the target thread is currently making a foreign call, then the
> > exception will not be raised (and hence throwTo will not 
> return) until
> > the call has completed.

Well, I haven't tried it, like I said. I guess it depends on whether
waitForProcess is implemented with an FFI call.

Note that this blocking behaviour (exception blocked until FFI call
returns) only seems to be with -threaded; with the normal RTS, the
exception is raised (although what happens to the OS thread is not
clear; I guess it still runs). At least, that's my experience on Win XP
with GHC-6.6.

Confidentiality Note: The information contained in this message,
and any attachments, may contain confidential and/or privileged
material. It is intended solely for the person(s) or entity to
which it is addressed. Any review, retransmission, dissemination,
or taking of any action in reliance upon this information by
persons or entities other than the intended recipient(s) is
prohibited. If you received this in error, please contact the
sender and delete the material from any computer.

More information about the Libraries mailing list