@@ -221,9 +221,9 @@ data StreamData a =
221-- they can go away rather than waiting indefinitely.
221-- they can go away rather than waiting indefinitely.
223-- | Execute the IO action resume the saved context
223-- | Execute the IO action resume the saved context
224−runContextWith :: (MonadIO m, MonadBaseControl IO m)
224+loopContextWith :: (MonadIO m, MonadBaseControl IO m)
225 => IO (StreamData t) -> Context -> m ()
225 => IO (StreamData t) -> Context -> m ()
226−runContextWith ioaction ctx = do
226+loopContextWith ioaction ctx = do
227 streamData <- liftIO $ ioaction `catch`
227 streamData <- liftIO $ ioaction `catch`
228 \(e :: SomeException) -> return $ SError e
228 \(e :: SomeException) -> return $ SError e
@@ -231,7 +231,7 @@ runContextWith ioaction ctx = do
231 case streamData of
231 case streamData of
232 SMore _ -> do
232 SMore _ -> do
233 forkMaybe resume ctx'
233 forkMaybe resume ctx'
234− runContextWith ioaction ctx
234+ loopContextWith ioaction ctx
235 _ -> resume ctx'
235 _ -> resume ctx'
237-- | Run an IO action one or more times to generate a stream of tasks. The IO
237-- | Run an IO action one or more times to generate a stream of tasks. The IO
@@ -259,7 +259,7 @@ parallel ioaction = AsyncT $ do
259 -- we have to execute the io action and generate an event and then continue
259 -- we have to execute the io action and generate an event and then continue
260 -- in this thread or a new thread.
260 -- in this thread or a new thread.
261 Nothing -> do
261 Nothing -> do
262− lift $ forkMaybe (runContextWith ioaction) context
262+ lift $ forkMaybe (loopContextWith ioaction) context
263 loc <- getLocation
263 loc <- getLocation
264 when (loc /= RemoteNode) $ setLocation WaitingParent
264 when (loc /= RemoteNode) $ setLocation WaitingParent
265 return Nothing
265 return Nothing