#1036: Asynchronous exceptions improvements
-----------------------------------------+----------------------------------
  Reporter:  simonmar                    |          Owner:  simonmar        
      Type:  task                        |         Status:  closed          
  Priority:  normal                      |      Milestone:  _|_             
 Component:  Compiler                    |        Version:  6.6             
Resolution:  fixed                       |       Keywords:                  
Difficulty:  Moderate (less than a day)  |             Os:  Unknown/Multiple
  Testcase:                              |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown                |  
-----------------------------------------+----------------------------------
Changes (by simonmar):

  * status:  new => closed
  * failure:  => None/Unknown
  * resolution:  => fixed


Comment:

 Done:

 {{{
 Thu Jul  8 16:27:35 BST 2010  Simon Marlow <[email protected]>
   *  New asynchronous exception control API (base parts)

   As discussed on the libraries/haskell-cafe mailing lists
     http://www.haskell.org/pipermail/libraries/2010-April/013420.html

   This is a replacement for block/unblock in the asychronous exceptions
   API to fix a problem whereby a function could unblock asynchronous
   exceptions even if called within a blocked context.

   The new terminology is "mask" rather than "block" (to avoid confusion
   due to overloaded meanings of the latter).

   The following is the new API; the old API is deprecated but still
   available for the time being.

   Control.Exception
   -----------------

   mask  :: ((forall a. IO a -> IO a) -> IO b) -> IO b
   mask_ :: IO a -> IO a

   uninterruptibleMask :: ((forall a. IO a -> IO a) -> IO b) -> IO b
   uninterruptibleMask_ :: IO a -> IO

   getMaskingState :: IO MaskingState

   data MaskingState
     = Unmasked
     | MaskedInterruptible
     | MaskedUninterruptible


   Control.Concurrent
   ------------------

   forkIOUnmasked :: IO () -> IO ThreadId

     M ./Control/Concurrent.hs -10 +13
     M ./Control/Concurrent/MVar.hs -8 +8
     M ./Control/Concurrent/QSem.hs -3 +3
     M ./Control/Concurrent/QSemN.hs -3 +3
     M ./Control/Concurrent/SampleVar.hs -5 +5
     M ./Control/Exception.hs -10 +17
     M ./Control/Exception/Base.hs -9 +15
     M ./Control/OldException.hs -19 +14
     M ./Data/HashTable.hs -1 +1
     M ./Data/Typeable.hs -2 +2
     M ./Foreign/Marshal/Pool.hs -3 +3
     M ./GHC/Conc.lhs -8 +20
     M ./GHC/IO.hs -12 +124
     M ./GHC/IO/Handle/Internals.hs -2 +2
 }}}

 and

 {{{
 Thu Jul  8 15:48:51 BST 2010  Simon Marlow <[email protected]>
   * New asynchronous exception control API (ghc parts)

   As discussed on the libraries/haskell-cafe mailing lists
     http://www.haskell.org/pipermail/libraries/2010-April/013420.html

   This is a replacement for block/unblock in the asychronous exceptions
   API to fix a problem whereby a function could unblock asynchronous
   exceptions even if called within a blocked context.

   The new terminology is "mask" rather than "block" (to avoid confusion
   due to overloaded meanings of the latter).

   In GHC, we changed the names of some primops:

     blockAsyncExceptions#   -> maskAsyncExceptions#
     unblockAsyncExceptions# -> unmaskAsyncExceptions#
     asyncExceptionsBlocked# -> getMaskingState#

   and added one new primop:

     maskUninterruptible#

   See the accompanying patch to libraries/base for the API changes.

     M ./compiler/prelude/primops.txt.pp -3 +10
     M ./includes/rts/storage/Closures.h -1 +1
     M ./includes/stg/MiscClosures.h -4 +7
     M ./rts/Exception.cmm -45 +111
     M ./rts/Linker.c -3 +4
     M ./rts/Prelude.h +1
     M ./rts/RaiseAsync.c -3 +6
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1036#comment:4>
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