on master help sign in
Minor code rearrangement
commit8bb60599a5e2734e0cda8aca75d26afdc0c2cbeb authorHarendra Kumar <harendra.kumar@gmail.com> dateSun 3 Sep 2017, 07:57 (9 years ago) parente06b319
1 file changed+1−5
src/Asyncly/AsyncT.hs+1−5
src/Asyncly/AsyncT.hs+1−5
@@ -459,11 +459,7 @@ parallel :: MonadAsync m => AsyncT m a -> AsyncT m a -> Bool -> AsyncT m a
459459parallel m1 m2 fifo = AsyncT $ \ctx stp yld -> do
460460 case ctx of
461461 Nothing -> (runAsyncT (pullFork m1 m2 fifo)) Nothing stp yld
462− Just c -> do
463− -- XXX We can statically decide which function to call here, that
464− -- will inline the call and improve perf a little bit.
465− liftIO $ (enqueue c) m2
466− (runAsyncT m1) ctx stp yld
462+ Just c -> liftIO ((enqueue c) m2) >> (runAsyncT m1) ctx stp yld
467463
468464instance MonadAsync m => Alternative (AsyncT m) where
469465 empty = mempty