Mention that throwTo does not guarantee promptness of delivery
authorsimonpj@microsoft <unknown>
Mon, 11 Dec 2006 12:32:15 +0000 (12:32 +0000)
committersimonpj@microsoft <unknown>
Mon, 11 Dec 2006 12:32:15 +0000 (12:32 +0000)
GHC/Conc.lhs

index 9e09672..466b2e7 100644 (file)
@@ -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 ->