on master help sign in
moving stop to outside.
commit0a5998865d2fbbac3fddee91a3fdd32d8e66036b authorKazu Yamamoto <kazu@iij.ad.jp> dateWed 16 Jul 2014, 11:46 (12 years ago) parentfdc4b35
1 file changed+3−1
auto-update/Control/AutoUpdate.hs+3−1
auto-update/Control/AutoUpdate.hs+3−1
@@ -135,7 +135,6 @@ getCurrent freq spawnThreshold action istatus = do
135135 spawn = handle onErr $ forever $ do
136136 threadDelay freq
137137 a <- action
138− let stop = throwIO Replaced
139138 join $ atomicModifyIORef istatus $ \status ->
140139 case status of
141140 AutoUpdated _ cnt tid
@@ -152,3 +151,6 @@ getCurrent freq spawnThreshold action istatus = do
152151 AutoUpdated _ _ tid' | tid == tid' -> (ManualUpdates 0, ())
153152 _ -> (status, ())
154153 throwIO ex
154+
155+stop :: IO a
156+stop = throwIO Replaced