Skip to content

Commit

Permalink
using stopManager in withManager
Browse files Browse the repository at this point in the history
  • Loading branch information
kazu-yamamoto committed Jul 11, 2023
1 parent 496dd42 commit 3334236
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions time-manager/System/TimeManager.hs
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ resume = tickle
----------------------------------------------------------------

-- | Call the inner function with a timeout manager.
-- 'stopManager' is used after that.
withManager :: Int -- ^ timeout in microseconds
-> (Manager -> IO a)
-> IO a
withManager timeout f = do
-- FIXME when stopManager is available, use it
man <- initialize timeout
f man
withManager timeout f = E.bracket (initialize timeout)
stopManager
f

0 comments on commit 3334236

Please sign in to comment.