From: simonpj@microsoft Date: Mon, 11 Dec 2006 12:32:15 +0000 (+0000) Subject: Mention that throwTo does not guarantee promptness of delivery X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=9dcb4b4f7cb532455d003ecd2435b098fa0499d2;p=haskell-directory.git Mention that throwTo does not guarantee promptness of delivery --- diff --git a/GHC/Conc.lhs b/GHC/Conc.lhs index 9e09672..466b2e7 100644 --- a/GHC/Conc.lhs +++ b/GHC/Conc.lhs @@ -242,6 +242,11 @@ is received by the target thread. The trade-off is discussed in Section 8 of th Like any blocking operation, 'throwTo' is therefore interruptible (see Section 4.3 of the paper). +There is currently no guarantee that the exception delivered by 'throwTo' will be +delivered at the first possible opportunity. In particular, if a thread may +unblock and then re-block exceptions (using 'unblock' and 'block') without receiving +a pending 'throwTo'. This is arguably undesirable behaviour. + -} throwTo :: ThreadId -> Exception -> IO () throwTo (ThreadId id) ex = IO $ \ s ->