Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use unblock in withResource

  • Loading branch information...
commit dd4e8f0c48b01f3999bd13f99a3fe1cff1e069eb 1 parent 91475b5
@norm2782 authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  Data/Pool.hs
View
2  Data/Pool.hs
@@ -176,7 +176,7 @@ withResource :: MonadCatchIO m => Pool a -> (a -> m b) -> m b
{-# SPECIALIZE withResource :: Pool a -> (a -> IO b) -> IO b #-}
withResource pool act = block $ do
(resource, local) <- liftIO $ takeResource pool
- ret <- act resource `onException`
+ ret <- unblock (act resource) `onException`
liftIO (destroyResource pool local resource)
liftIO $ putResource local resource
return ret
Please sign in to comment.
Something went wrong with that request. Please try again.