Implementation of wye.
Implementation of wye.
Type of left process element
Type of right process elements
Output type of resulting process
left process
right process
wye to control queueing and merging
strategy, preferably executor service based
Process with merged elements.
Transform the left input of the given Wye
using a Process1
.
Transform the right input of the given Wye
using a Process1
.
A Wye
which emits values from its right branch, but allows up to n
elements from the left branch to enqueue unanswered before blocking
on the right branch.
Transforms the wye so it will stop to listen on left side.
Transforms the wye so it will stop to listen on left side.
Instead all requests on the left side are converted to termination with Kill
,
and will terminate once the right side will terminate as well.
Transforms AwaitBoth
to AwaitR
Transforms AwaitL
to termination with End
right alternative of detach1L
Signals to wye, that Left side terminated.
Signals to wye, that Left side terminated.
Reason for termination is cause
. Any Left
requests will be terminated with cause
Wye will be switched to listen only on Right side, that means Await(Both) is converted to Await(R)
Right side alternative for disconnectL
After each input, dynamically determine whether to read from the left, right, or both,
for the subsequent input, using the provided functions f
and g
.
After each input, dynamically determine whether to read from the left, right, or both,
for the subsequent input, using the provided functions f
and g
. The returned
Wye
begins by reading from the left side and is left-biased--if a read of both branches
returns a These(x,y)
, it uses the signal generated by f
for its next step.
Invokes dynamic
with I == I2
, and produces a single I
output.
Invokes dynamic
with I == I2
, and produces a single I
output. Output is
left-biased: if a These(i1,i2)
is emitted, this is translated to an
emitSeq(List(i1,i2))
.
Continuous wye, that first reads from Left to get A
,
Then when A
is not available it reads from R echoing any A
that was received from Left
Will halt once any of the sides halt
Nondeterminstic interleave of both inputs.
Nondeterminstic interleave of both inputs. Emits values whenever either of the inputs is available.
Feed a single ReceiveY
value to a Wye
.
Feed a single value to the left branch of a Wye
.
Feed a single value to the right branch of a Wye
.
Feed a sequence of inputs to the left side of a Wye
.
Feed a sequence of inputs to the right side of a Wye
.
Convert right requests to left requests and vice versa.
Signals to wye that left side halted with cause
.
Signals to wye that left side halted with cause
. Wye will be fed with HaltL(cause)
and will disconnect from Left side.
Right alternative for haltL
Let through the right branch as long as the left branch is false
,
listening asynchronously for the left branch to become true
.
Let through the right branch as long as the left branch is false
,
listening asynchronously for the left branch to become true
.
This halts as soon as the right or left branch halts.
Non-deterministic interleave of both inputs.
Non-deterministic interleave of both inputs. Emits values whenever either of the inputs is available.
Will terminate once both sides terminate.
Like merge
, but terminates whenever one side terminate.
Like merge
, but terminates whenever left side terminates.
Like merge
, but terminates whenever left side terminates.
use flip
to reverse this for the right side
Like merge
, but terminates whenever right side terminates
A Wye
which blocks on the right side when either
a) the age of the oldest unanswered element from the left size exceeds the given duration, or
b) the number of unanswered elements from the left exceeds maxSize
.
Wye
which repeatedly awaits both branches, emitting any values
received from the right.
Wye
which repeatedly awaits both branches, emitting any values
received from the right. Useful in conjunction with connect
,
for instance src.connect(snk)(unboundedQueue)
Nondeterministic version of zip
which requests both sides in parallel.
Left-biased, buffered version of yip
.
Left-biased, buffered version of yip
. Allows up to n
elements to enqueue on the
left unanswered before requiring a response from the right. If buffer is empty,
always reads from the left.
Nondeterministic version of zipWith
which requests both sides in parallel.
Left-biased, buffered version of yipWith
.
Left-biased, buffered version of yipWith
. Allows up to n
elements to enqueue on the
left unanswered before requiring a response from the right. If buffer is empty,
always reads from the left.