X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=GHC%2FConc.lhs;h=466b2e7010bc3a3e225d225de5ffeedeeac3bd52;hb=9dcb4b4f7cb532455d003ecd2435b098fa0499d2;hp=9e0967248bf15b9027136b32e6999f9892836f69;hpb=945d583470fa9bee6c5c1e652e2be9241deffc25;p=ghc-base.git 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 ->