From: ross Date: Tue, 5 Aug 2003 17:25:31 +0000 (+0000) Subject: [project @ 2003-08-05 17:25:30 by ross] X-Git-Tag: nhc98-1-18-release~544 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=f6c8204a3d0865ffc39f4451320d46d1571c1f66;p=ghc-base.git [project @ 2003-08-05 17:25:30 by ross] fix some identifier links --- diff --git a/Control/Exception.hs b/Control/Exception.hs index 2db472f..7d66da8 100644 --- a/Control/Exception.hs +++ b/Control/Exception.hs @@ -185,7 +185,7 @@ catch = ExceptionBase.catchException -- exceptions: 'ioErrors', 'arithExceptions', and so on. For example, -- to catch just calls to the 'error' function, we could use -- --- > result \<- catchJust errorCalls thing_to_try handler +-- > result <- catchJust errorCalls thing_to_try handler -- -- Any other exceptions which are not matched by the predicate -- are re-raised, and may be caught by an enclosing @@ -460,8 +460,10 @@ in an asynchronous-exception-safe way, you will need to use Some operations are /interruptible/, which means that they can receive asynchronous exceptions even in the scope of a 'block'. Any function which may itself block is defined as interruptible; this includes -'takeMVar' (but not 'tryTakeMVar'), and most operations which perform -some I\/O with the outside world.. The reason for having +'Control.Concurrent.MVar.takeMVar' +(but not 'Control.Concurrent.MVar.tryTakeMVar'), +and most operations which perform +some I\/O with the outside world. The reason for having interruptible operations is so that we can write things like > block ( @@ -470,14 +472,15 @@ interruptible operations is so that we can write things like > (\e -> ...) > ) -if the 'takeMVar' was not interruptible, then this particular +if the 'Control.Concurrent.MVar.takeMVar' was not interruptible, +then this particular combination could lead to deadlock, because the thread itself would be blocked in a state where it can\'t receive any asynchronous exceptions. -With 'takeMVar' interruptible, however, we can be +With 'Control.Concurrent.MVar.takeMVar' interruptible, however, we can be safe in the knowledge that the thread can receive exceptions right up -until the point when the 'takeMVar' succeeds. +until the point when the 'Control.Concurrent.MVar.takeMVar' succeeds. Similar arguments apply for other interruptible operations like -'GHC.Handle.openFile'. +'System.IO.openFile'. -} -- ----------------------------------------------------------------------------- diff --git a/GHC/IOBase.lhs b/GHC/IOBase.lhs index 93a02b7..84a2d84 100644 --- a/GHC/IOBase.lhs +++ b/GHC/IOBase.lhs @@ -620,7 +620,7 @@ data AsyncException -- * GHC currently does not throw 'HeapOverflow' exceptions. | ThreadKilled -- ^This exception is raised by another thread - -- calling 'killThread', or by the system + -- calling 'Control.Concurrent.killThread', or by the system -- if it needs to terminate the thread for some -- reason. deriving (Eq, Ord)