#6126: Fix risk of dead-lock in documentation of Control.Concurrent
--------------------------------+-------------------------------------------
  Reporter:  basvandijk         |          Owner:                  
      Type:  bug                |         Status:  closed          
  Priority:  normal             |      Milestone:                  
 Component:  libraries/base     |        Version:  7.4.1           
Resolution:  fixed              |       Keywords:                  
        Os:  Unknown/Multiple   |   Architecture:  Unknown/Multiple
   Failure:  Documentation bug  |     Difficulty:  Unknown         
  Testcase:                     |      Blockedby:                  
  Blocking:                     |        Related:                  
--------------------------------+-------------------------------------------
Changes (by simonmar):

  * status:  new => closed
  * resolution:  => fixed


Comment:

 Fixed:

 {{{
 commit 40d1be115d2a5a409e9b747c347cd909a9607c42
 Author: Simon Marlow <[email protected]>
 Date:   Thu Jun 7 16:10:47 2012 +0100

     add forkFinally

     This is a more robust version of "forkIO (m `finally` k)", because it
     closes a window between thread creation and the finally where the
     thread can receive an async exception.  Useful for layers over threads
     that need to catch threads dying with absolute certainty.

     forkFinally :: IO a -> (Either SomeException a -> IO ()) -> IO
 ThreadId
     forkFinally action and_then =
       mask $ \restore ->
         forkIO $ try (restore action) >>= and_then
 }}}

 and the new `Async` API is currently being discussed on the libraries
 list; a preliminary implementation is here:
 [https://github.com/simonmar/async]

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6126#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to