on master help sign in
more refactoring.
commit285c50f8f70ed6f226354b4cef7f7e74a839b633 authorKazu Yamamoto <kazu@iij.ad.jp> dateThu 10 Oct 2013, 17:22 (13 years ago) parentf6289fc
2 files changed+12−9
warp/Network/Wai/Handler/Warp.hs+2−1 warp/Network/Wai/Handler/Warp/Timeout.hs+10−8
warp/Network/Wai/Handler/Warp.hs+2−1
@@ -52,9 +52,10 @@ module Network.Wai.Handler.Warp (
5252 , withManager
5353 , register
5454 , registerKillThread
55+ , tickle
56+ , cancel
5557 , resume
5658 , pause
57− , cancel
5859 -- ** Cleaner
5960 , Cleaner
6061 , dummyCleaner
warp/Network/Wai/Handler/Warp/Timeout.hs+10−8
@@ -123,21 +123,23 @@ mkWeakThreadId t@(ThreadId t#) = IO $ \s ->
123123
124124-- | Setting the state to active.
125125-- 'Manager' turns active to inactive repeatedly.
126−resume :: Handle -> IO ()
127−resume (Handle _ iactive) = I.writeIORef iactive Active
128−
129126tickle :: Handle -> IO ()
130−tickle = resume
127+tickle (Handle _ iactive) = I.writeIORef iactive Active
128+
129+-- | Setting the state to canceled.
130+-- 'Manager' eventually removes this without timeout action.
131+cancel :: Handle -> IO ()
132+cancel (Handle _ iactive) = I.writeIORef iactive Canceled
131133
132134-- | Setting the state to paused.
133135-- 'Manager' does not change the value.
134136pause :: Handle -> IO ()
135137pause (Handle _ iactive) = I.writeIORef iactive Paused
136138
137−-- | Setting the state to canceled.
138−-- 'Manager' eventually removes this without timeout action.
139−cancel :: Handle -> IO ()
140−cancel (Handle _ iactive) = I.writeIORef iactive Canceled
139+-- | Setting the state to active.
140+-- This is an alias to 'ticle'.
141+resume :: Handle -> IO ()
142+resume = tickle
141143
142144----------------------------------------------------------------
143145