on master help sign in
rename for clarity
commit1b2ac02e4e59f88b2ecafd1fa94215977592cc6e authorHarendra Kumar <harendra.kumar@gmail.com> dateWed 14 Jun 2017, 00:31 (9 years ago) parent6a572e5
1 file changed+4−4
src/Duct/Threads.hs+4−4
src/Duct/Threads.hs+4−4
@@ -221,9 +221,9 @@ data StreamData a =
221221-- they can go away rather than waiting indefinitely.
222222--
223223-- | Execute the IO action resume the saved context
224−runContextWith :: (MonadIO m, MonadBaseControl IO m)
224+loopContextWith :: (MonadIO m, MonadBaseControl IO m)
225225 => IO (StreamData t) -> Context -> m ()
226−runContextWith ioaction ctx = do
226+loopContextWith ioaction ctx = do
227227 streamData <- liftIO $ ioaction `catch`
228228 \(e :: SomeException) -> return $ SError e
229229
@@ -231,7 +231,7 @@ runContextWith ioaction ctx = do
231231 case streamData of
232232 SMore _ -> do
233233 forkMaybe resume ctx'
234− runContextWith ioaction ctx
234+ loopContextWith ioaction ctx
235235 _ -> resume ctx'
236236
237237-- | Run an IO action one or more times to generate a stream of tasks. The IO
@@ -259,7 +259,7 @@ parallel ioaction = AsyncT $ do
259259 -- we have to execute the io action and generate an event and then continue
260260 -- in this thread or a new thread.
261261 Nothing -> do
262− lift $ forkMaybe (runContextWith ioaction) context
262+ lift $ forkMaybe (loopContextWith ioaction) context
263263 loc <- getLocation
264264 when (loc /= RemoteNode) $ setLocation WaitingParent
265265 return Nothing