Non-deterministic interleave of both streams.
Non-deterministic interleave of both streams. Emits values whenever either is defined. Note this terminates after BOTH sides terminate
Produce a continuous stream from a discrete stream by using the most recent value.
Non-deterministic interleave of both streams.
Non-deterministic interleave of both streams. Emits values whenever either is defined. Note this terminates after BOTH sides terminate
Returns result of channel evaluation tupled with original value passed to channel.
Asynchronous stepping of this Process.
Asynchronous stepping of this Process. Note that this method is not resource safe unless callback is called with _left_ side completed. In that case it is guaranteed that all cleanups has been successfully completed. User of this method is responsible for any cleanup actions to be performed by running the next Process obtained on right side of callback.
This method returns a function, that when applied, causes the running computation to be interrupted. That is useful of process contains any asynchronous code, that may be left with incomplete callbacks. If the evaluation of the process is interrupted, then the interruption is only active if the callback was not completed before, otherwise interruption is no-op.
There is chance, that cleanup code of intermediate Await
will get called twice on interrupt, but
always at least once. The second cleanup invocation in that case may run on different thread, asynchronously.
Please note that this method is *not* intended for external use! It is the Await
analogue of step
, which
is also an internal-use function.
result of the asynchronous evaluation of the process. Note that, the callback is never called on the right side, if the sequence is empty.
Strategy to use when evaluating the process. Note that Strategy.Sequential
may cause SOE.
Function to interrupt the evaluation
converts process to signal *
Like tee
, but we allow the Wye
to read non-deterministically
from both sides at once.
Like tee
, but we allow the Wye
to read non-deterministically
from both sides at once.
If y
is in the state of awaiting Both
, this implementation
will continue feeding y
from either left or right side,
until either it halts or _both_ sides halt.
If y
is in the state of awaiting L
, and the left
input has halted, we halt. Likewise for the right side.
For as long as y
permits it, this implementation will _always_
feed it any leading Emit
elements from either side before issuing
new F
requests. More sophisticated chunking and fairness
policies do not belong here, but should be built into the Wye
and/or its inputs.
The strategy passed in must be stack-safe, otherwise this implementation
will throw SOE. Preferably use one of the Strategys.Executor(es)
based strategies
Non-deterministic version of zip
.
Non-deterministic version of zip
. Note this terminates whenever one of streams terminate
Non-deterministic version of zipWith
.
Non-deterministic version of zipWith
. Note this terminates whenever one of streams terminate
(sourceSyntax: StringAdd).self
(sourceSyntax: StringFormat).self
(sourceSyntax: ArrowAssoc[SourceSyntax[O]]).x
(Since version 2.10.0) Use leftOfArrow
instead
(sourceSyntax: Ensuring[SourceSyntax[O]]).x
(Since version 2.10.0) Use resultOfEnsuring
instead
Syntax for processes that have its effects wrapped in Task