[GHC] #4810: Versions of bracket without masking acquire action

GHC cvs-ghc at haskell.org
Wed Dec 1 15:26:11 CET 2010


#4810: Versions of bracket without masking acquire action
---------------------------------+------------------------------------------
    Reporter:  mitar             |        Owner:              
        Type:  proposal          |       Status:  new         
    Priority:  normal            |    Milestone:              
   Component:  libraries/base    |      Version:  7.0.1       
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by simonmar):

 I don't see how you could use that safely.  `bracket` only works when the
 acquire action is atomic - either it acquires the resource and returns, or
 it does not acquire the resource and raises an exception.  If the acquire
 action is unmasked, then it could both acquire the resource ''and'' raise
 an exception, and the resource would not be released.

 If you have an example of a safe use, could you show me the code?

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



More information about the Glasgow-haskell-bugs mailing list