async-pool icon indicating copy to clipboard operation
async-pool copied to clipboard

lifted/generalised version of this library?

Open saurabhnanda opened this issue 6 years ago • 3 comments

Does this library have a "lifted" version similar to lifted-async or UnliftIO.async ?

saurabhnanda avatar Jan 21 '20 20:01 saurabhnanda

No, not presently.

jwiegley avatar Jan 21 '20 22:01 jwiegley

Is there workaround to run mapTasks in something other than IO? MonadBaseControl is not applicable -> because "a" type is different

yaitskov avatar Feb 03 '23 23:02 yaitskov

myMapTasks :: (Monad (t IO), MonadTransControl t) => AP.TaskGroup -> [t IO a] -> t IO [a]
myMapTasks tg a =
  liftWith (\rib -> AP.mapTasks tg (rib <$> a)) >>= \x ->
    traverse (restoreT . return) x

yaitskov avatar Feb 04 '23 03:02 yaitskov