@@ -12,12 +12,12 @@ module Strands.Threads
1212 , threads
1313
1414 , wait
15− , gather
15+ , wait_
1616
1717 , logged
1818 , suspend
1919 , waitLogged
20− , gatherLogged
20+ , waitLogged_
2121 , withLog
2222 , eachWithLog
2323 )
@@ -539,18 +539,16 @@ gatherResult ref r = do
539539
540540-- | Run an 'AsyncT m' computation and collect the results generated by each
541541-- thread of the computation in a list.
542−gather :: forall m a. (MonadIO m, MonadCatch m)
543− => AsyncT m a -> m [a]
544−gather m = do
542+wait :: (MonadIO m, MonadCatch m) => AsyncT m a -> m [a]
543+wait m = do
545544 resultsRef <- liftIO $ newIORef []
546545 waitAsync (gatherResult resultsRef) Nothing m
547546 liftIO $ readIORef resultsRef
548547
549548-- | Run an 'AsyncT m' computation, wait for it to finish and discard the
550549-- results.
551−wait :: forall m a. (MonadIO m, MonadCatch m)
552− => AsyncT m a -> m ()
553−wait m = waitAsync (const mzero) Nothing m
550+wait_ :: (MonadIO m, MonadCatch m) => AsyncT m a -> m ()
551+wait_ m = waitAsync (const mzero) Nothing m
554552
555553------------------------------------------------------------------------------
556554-- Logging
@@ -636,8 +634,8 @@ eachWithLog m logs = each logs >>= withLog m
636634
637635-- | Run an 'AsyncT m' computation with logging enabled and collect the results
638636-- or logs generated by each thread of the computation.
639−gatherLogged :: (MonadIO m, MonadCatch m) => AsyncT m a -> m ([a], [Log])
640−gatherLogged m = do
637+waitLogged :: (MonadIO m, MonadCatch m) => AsyncT m a -> m ([a], [Log])
638+waitLogged m = do
641639 resultsRef <- liftIO $ newIORef []
642640 lref <- liftIO $ newIORef []
643641 waitAsync (gatherResult resultsRef) (Just lref) m
@@ -648,8 +646,8 @@ gatherLogged m = do
648646-- | Run an 'AsyncT m' computation with logging enabled, wait for it to finish
649647-- and discard the results. If the computation suspends collect the logs to
650648-- replay later.
651−waitLogged :: (MonadIO m, MonadCatch m) => AsyncT m a -> m [Log]
652−waitLogged m = do
649+waitLogged_ :: (MonadIO m, MonadCatch m) => AsyncT m a -> m [Log]
650+waitLogged_ m = do
653651 lref <- liftIO $ newIORef []
654652 waitAsync (const mzero) (Just lref) m
655653 logs <- liftIO $ readIORef lref