use uninterruptibleMask
Some recent changes to use mask missed that async exceptions can still be thrown inside it. The goal is to make sure a block of cleanup code runs entirely, w/o being interrupted by an async exception, so use uninterruptibleMask. Also, converted a few to bracket, which is nicer.
This commit is contained in:
parent
7013798df5
commit
24ff5e2b29
4 changed files with 7 additions and 7 deletions
|
@ -230,9 +230,10 @@ probeLockSupport = withEventuallyCleanedOtherTmp $ \tmp -> do
|
|||
where
|
||||
go f mode = do
|
||||
nukeFile f
|
||||
let locktest = mask $ const $
|
||||
Posix.lockExclusive (Just mode) f
|
||||
>>= Posix.dropLock
|
||||
let locktest = bracket
|
||||
(Posix.lockExclusive (Just mode) f)
|
||||
Posix.dropLock
|
||||
(const noop)
|
||||
ok <- isRight <$> tryNonAsync locktest
|
||||
nukeFile f
|
||||
return ok
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue