@@ -289,46 +289,46 @@ append2 = combineWith id
289289-- the left stream. This schedules all streams in a round robin fashion over
290290-- limited number of threads.
291291--
292−-- >>> interleave2 = Async.combineWith Async.interleaved
292+-- >>> interleave2 = Async.combineWith (Async.interleaved True)
293293--
294294{-# INLINE interleave2 #-}
295295interleave2 :: MonadAsync m => Stream m a -> Stream m a -> Stream m a
296−interleave2 = combineWith interleaved
296+interleave2 = combineWith (interleaved True)
297297
298298-- | Like 'append' but with 'ordered' on.
299299--
300−-- >>> ahead2 = Async.combineWith Async.ordered
300+-- >>> ahead2 = Async.combineWith (Async.ordered True)
301301--
302302{-# INLINE ahead2 #-}
303303ahead2 :: MonadAsync m => Stream m a -> Stream m a -> Stream m a
304−ahead2 = combineWith ordered
304+ahead2 = combineWith (ordered True)
305305
306306-- | Like 'append2' but with 'eager' on.
307307--
308−-- >>> parallel2 = Async.combineWith Async.eager
308+-- >>> parallel2 = Async.combineWith (Async.eager True)
309309--
310310{-# INLINE parallel2 #-}
311311parallel2 :: MonadAsync m => Stream m a -> Stream m a -> Stream m a
312−parallel2 = combineWith eager
312+parallel2 = combineWith (eager True)
313313
314314-- | Like 'parallel2' but stops the output as soon as the first stream stops.
315315--
316−-- >>> parallelFst2 = Async.combineWith (Async.eager . Async.stopWhen Async.FirstStops)
316+-- >>> parallelFst2 = Async.combineWith (Async.eager True . Async.stopWhen Async.FirstStops)
317317--
318318-- /Pre-release/
319319{-# INLINE parallelFst2 #-}
320320parallelFst2 :: MonadAsync m => Stream m a -> Stream m a -> Stream m a
321−parallelFst2 = combineWith (eager . stopWhen FirstStops)
321+parallelFst2 = combineWith (eager True . stopWhen FirstStops)
322322
323323-- | Like 'parallel2' but stops the output as soon as any of the two streams
324324-- stops.
325325--
326−-- >>> parallelMin2 = Async.combineWith (Async.eager . Async.stopWhen Async.AnyStops)
326+-- >>> parallelMin2 = Async.combineWith (Async.eager True . Async.stopWhen Async.AnyStops)
327327--
328328-- /Pre-release/
329329{-# INLINE parallelMin2 #-}
330330parallelMin2 :: MonadAsync m => Stream m a -> Stream m a -> Stream m a
331−parallelMin2 = combineWith (eager . stopWhen AnyStops)
331+parallelMin2 = combineWith (eager True . stopWhen AnyStops)
332332
333333-------------------------------------------------------------------------------
334334-- concat streams
@@ -482,11 +482,11 @@ concatMap = concatMapWith id
482482-- evaluate the earlier stream first, this schedules all streams in a round
483483-- robin fashion over the available threads.
484484--
485−-- >>> concatMapInterleave = Async.concatMapWith Async.interleaved
485+-- >>> concatMapInterleave = Async.concatMapWith (Async.interleaved True)
486486--
487487-- When used with a single thread it behaves like serial interleaving:
488488--
489−-- >>> f cfg xs = Stream.fold Fold.toList $ Async.concatMapWith (Async.interleaved . cfg) id $ Stream.fromList xs
489+-- >>> f cfg xs = Stream.fold Fold.toList $ Async.concatMapWith (Async.interleaved True . cfg) id $ Stream.fromList xs
490490--
491491-- >>> stream1 = Stream.fromList [1,2,3]
492492-- >>> stream2 = Stream.fromList [4,5,6]
@@ -497,7 +497,7 @@ concatMap = concatMapWith id
497497--
498498{-# INLINE concatMapInterleave #-}
499499concatMapInterleave :: MonadAsync m => (a -> Stream m b) -> Stream m a -> Stream m b
500−concatMapInterleave = concatMapWith interleaved
500+concatMapInterleave = concatMapWith (interleaved True)
501501
502502-- | Like 'concat' but we can also specify the concurrent channel's
503503-- configuration parameters using Config modifiers.
@@ -541,44 +541,44 @@ append = concatListWith id
541541-- the left stream. This schedules all streams in a round robin fashion over
542542-- limited number of threads.
543543--
544−-- >>> interleave = Async.concatListWith Async.interleaved
544+-- >>> interleave = Async.concatListWith (Async.interleaved True)
545545--
546546{-# INLINE interleave #-}
547547interleave :: MonadAsync m => [Stream m a] -> Stream m a
548−interleave = concatListWith interleaved
548+interleave = concatListWith (interleaved True)
549549
550550-- | Like 'append' but with 'ordered' on.
551551--
552−-- >>> ahead = Async.concatListWith Async.ordered
552+-- >>> ahead = Async.concatListWith (Async.ordered True)
553553--
554554{-# INLINE ahead #-}
555555ahead :: MonadAsync m => [Stream m a] -> Stream m a
556−ahead = concatListWith ordered
556+ahead = concatListWith (ordered True)
557557
558558-- | Like 'append' but with 'eager' on.
559559--
560−-- >>> parallel = Async.concatListWith Async.eager
560+-- >>> parallel = Async.concatListWith (Async.eager True)
561561--
562562{-# INLINE parallel #-}
563563parallel :: MonadAsync m => [Stream m a] -> Stream m a
564−parallel = concatListWith eager
564+parallel = concatListWith (eager True)
565565
566566-- | Like 'parallel' but stops the output as soon as the first stream stops.
567567--
568−-- >>> parallelFst = Async.concatListWith (Async.eager . Async.stopWhen Async.FirstStops)
568+-- >>> parallelFst = Async.concatListWith (Async.eager True . Async.stopWhen Async.FirstStops)
569569--
570570{-# INLINE parallelFst #-}
571571parallelFst :: MonadAsync m => [Stream m a] -> Stream m a
572−parallelFst = concatListWith (eager . stopWhen FirstStops)
572+parallelFst = concatListWith (eager True . stopWhen FirstStops)
573573
574574-- | Like 'parallel' but stops the output as soon as any of the two streams
575575-- stops.
576576--
577−-- >>> parallelMin = Async.concatListWith (Async.eager . Async.stopWhen Async.AnyStops)
577+-- >>> parallelMin = Async.concatListWith (Async.eager True . Async.stopWhen Async.AnyStops)
578578--
579579{-# INLINE parallelMin #-}
580580parallelMin :: MonadAsync m => [Stream m a] -> Stream m a
581−parallelMin = concatListWith (eager . stopWhen AnyStops)
581+parallelMin = concatListWith (eager True . stopWhen AnyStops)
582582
583583-------------------------------------------------------------------------------
584584-- Applicative
@@ -671,7 +671,7 @@ zipWith f = zipWithM (\a b -> return $ f a b)
671671{-# INLINE_NORMAL newCallbackStream #-}
672672newCallbackStream :: MonadAsync m => m (a -> m (), Stream m a)
673673newCallbackStream = do
674− chan <- newChannel eager
674+ chan <- newChannel (eager True)
675675
676676 -- XXX Add our own thread-id to the SVar as we can not know the callback's
677677 -- thread-id and the callback is not run in a managed worker. We need to