on master help sign in
Minor code rearrangement
8bb6059Harendra Kumar
src/Asyncly/AsyncT.hs+1−5
@@ -459,11 +459,7 @@ parallel :: MonadAsync m => AsyncT m a -> AsyncT m a -> Bool -> AsyncT m a
459parallel m1 m2 fifo = AsyncT $ \ctx stp yld -> do
459parallel m1 m2 fifo = AsyncT $ \ctx stp yld -> do
460 case ctx of
460 case ctx of
461 Nothing -> (runAsyncT (pullFork m1 m2 fifo)) Nothing stp yld
461 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
467
463
468instance MonadAsync m => Alternative (AsyncT m) where
464instance MonadAsync m => Alternative (AsyncT m) where
469 empty = mempty
465 empty = mempty