jwiegley / async-pool

Other
21 stars 13 forks source link

lifted/generalised version of this library? #18

Open saurabhnanda opened 4 years ago

saurabhnanda commented 4 years ago

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

jwiegley commented 4 years ago

No, not presently.

yaitskov commented 1 year ago

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

yaitskov commented 1 year ago
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