Pass elements of s
through both f
and g
, then combine the two resulting streams.
Pass elements of s
through both f
and g
, then combine the two resulting streams.
Implemented by enqueueing elements as they are seen by f
onto a Queue
used by the g
branch.
USE EXTREME CARE WHEN USING THIS FUNCTION. Deadlocks are possible if combine
pulls from the g
branch synchronously before the queue has been populated by the f
branch.
The combine
function receives an F[Int]
effect which evaluates to the current size of the
g
-branch's queue.
When possible, use one of the safe combinators like observe
, which are built using this function,
in preference to using this function directly.
Synchronously send values through sink
.
Send chunks through sink
, allowing up to maxQueued
pending _chunks_ before blocking s
.