From 4cd3a6475de0ef9a9d1bd0b6e8cf3fb336b80a43 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Thu, 14 Oct 2010 08:42:20 +0000 Subject: [PATCH 1/1] throwTo: mention interruptible foreign calls --- GHC/Conc/Sync.lhs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GHC/Conc/Sync.lhs b/GHC/Conc/Sync.lhs index cc16853..9b7415d 100644 --- a/GHC/Conc/Sync.lhs +++ b/GHC/Conc/Sync.lhs @@ -274,7 +274,10 @@ another thread. 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. This is the case regardless of whether -the call is inside a 'mask' or not. +the call is inside a 'mask' or not. However, in GHC a foreign call +can be annotated as @interruptible@, in which case a 'throwTo' will +cause the RTS to attempt to cause the call to return; see the GHC +documentation for more details. Important note: the behaviour of 'throwTo' differs from that described in the paper \"Asynchronous exceptions in Haskell\" -- 1.7.10.4