Alias for append
Alias for append
If this process halts due to Cause.End
, runs p2
after this
.
If this process halts due to Cause.End
, runs p2
after this
.
Otherwise halts with whatever caused this
to Halt
.
Mostly internal use function.
Mostly internal use function. Ensures this Process
is run even
when being kill
-ed. Used to ensure resource safety in various
combinators.
Catch exceptions produced by this Process
, not including termination by Continue
, End
, Kill
and uses f
to decide whether to resume a second process.
Catch exceptions produced by this Process
, not including termination by Continue
, End
, Kill
and uses f
to decide whether to resume a second process.
Alias for this |> process1.awaitOption
.
Alias for this |> process1.awaitOption
.
Alias for this |> process1.buffer(n)
.
Alias for this |> process1.buffer(n)
.
Alias for this |> process1.bufferAll
.
Alias for this |> process1.bufferAll
.
Alias for this |> process1.bufferBy(f)
.
Alias for this |> process1.bufferBy(f)
.
Attached cause
when this Process terminates.
Attached cause
when this Process terminates. See Cause.causedBy
for semantics.
Alias for this |> process1.chunk(n)
.
Alias for this |> process1.chunk(n)
.
Alias for this |> process1.chunkAll
.
Alias for this |> process1.chunkAll
.
Alias for this |> process1.chunkBy(f)
.
Alias for this |> process1.chunkBy(f)
.
Alias for this |> process1.chunkBy2(f)
.
Alias for this |> process1.chunkBy2(f)
.
Alias for this |> process1.collect(pf)
.
Alias for this |> process1.collect(pf)
.
Alias for this |> process1.collectFirst(pf)
.
Alias for this |> process1.collectFirst(pf)
.
Alias for this |> process1.delete(f)
.
Alias for this |> process1.delete(f)
.
Used when a Process1
, Tee
, or Wye
is terminated by awaiting
on a branch that is in the halted state or was killed.
Used when a Process1
, Tee
, or Wye
is terminated by awaiting
on a branch that is in the halted state or was killed. Such a process
is given the opportunity to emit any final values. All Awaits are
converted to terminate with cause
Alias for this |> process1.distinctConsecutive
.
Alias for this |> process1.distinctConsecutive
.
Alias for this |> process1.distinctConsecutiveBy(f)
.
Alias for this |> process1.distinctConsecutiveBy(f)
.
Ignore all outputs of this Process
.
Ignore all outputs of this Process
.
Alias for this |> process1.drop(n)
.
Alias for this |> process1.drop(n)
.
Alias for this |> process1.dropLast
.
Alias for this |> process1.dropLast
.
Alias for this |> process1.dropLastIf(p)
.
Alias for this |> process1.dropLastIf(p)
.
Alias for this |> process1.dropRight(n)
.
Alias for this |> process1.dropRight(n)
.
Alias for this |> process1.dropWhile(f)
.
Alias for this |> process1.dropWhile(f)
.
Map over this Process
to produce a stream of F
-actions,
then evaluate these actions.
Map over this Process
to produce a stream of F
-actions,
then evaluate these actions.
Alias for this |> process1.exists(f)
Alias for this |> process1.exists(f)
Alias for append
Alias for append
Alias for this |> process1.filter(f)
.
Alias for this |> process1.filter(f)
.
Alias for this |> process1.filterBy2(f)
.
Alias for this |> process1.filterBy2(f)
.
Alias for this |> process1.find(f)
Alias for this |> process1.find(f)
Generate a Process
dynamically for each output of this Process
, and
sequence these processes using append
.
Generate a Process
dynamically for each output of this Process
, and
sequence these processes using append
.
Alias for this |> process1.fold(b)(f)
.
Alias for this |> process1.fold(b)(f)
.
Alias for this |> process1.fold1(f)
.
Alias for this |> process1.fold1(f)
.
Alias for this |> process1.fold1Map(f)(M)
.
Alias for this |> process1.fold1Map(f)(M)
.
Alias for this |> process1.fold1Monoid(M)
Alias for this |> process1.fold1Monoid(M)
Alias for this |> process1.foldMap(f)(M)
.
Alias for this |> process1.foldMap(f)(M)
.
Alias for this |> process1.foldMonoid(M)
Alias for this |> process1.foldMonoid(M)
Alias for this |> process1.foldSemigroup(M)
.
Alias for this |> process1.foldSemigroup(M)
.
Alias for this |> process1.forall(f)
Alias for this |> process1.forall(f)
Map over this Process
to produce a stream of F
-actions,
then evaluate these actions in batches of bufSize
, allowing
for nondeterminism in the evaluation order of each action in the
batch.
Map over this Process
to produce a stream of F
-actions,
then evaluate these actions in batches of bufSize
, allowing
for nondeterminism in the evaluation order of each action in the
batch.
Catch some of the exceptions generated by this Process
, rethrowing any
not handled by the given PartialFunction
and stripping out any values
emitted before the error.
Catch some of the exceptions generated by this Process
, rethrowing any
not handled by the given PartialFunction
and stripping out any values
emitted before the error.
Alternate emitting elements from this
and p2
, starting with this
.
Alternate emitting elements from this
and p2
, starting with this
.
Alias for this |> process1.intersperse(sep)
.
Alias for this |> process1.intersperse(sep)
.
Returns true, if this process is halted
Returns true, if this process is halted
Causes this process to be terminated immediately with Kill
cause,
giving chance for any cleanup actions to be run
Causes this process to be terminated immediately with Kill
cause,
giving chance for any cleanup actions to be run
Alias for this |> process1.last
.
Alias for this |> process1.last
.
Alias for this |> process1.last
.
Alias for this |> process1.last
.
Transforms the output values of this Process
using f
.
Transforms the output values of this Process
using f
.
Alias for this |> process1.mapAccumulate(s)(f)
.
Alias for this |> process1.mapAccumulate(s)(f)
.
Alias for this |> process1.maximum
.
Alias for this |> process1.maximum
.
Alias for this |> process1.maximumBy(f)
.
Alias for this |> process1.maximumBy(f)
.
Alias for this |> process1.maximumOf(f)
.
Alias for this |> process1.maximumOf(f)
.
Alias for this |> process1.minimum
.
Alias for this |> process1.minimum
.
Alias for this |> process1.minimumBy(f)
.
Alias for this |> process1.minimumBy(f)
.
Alias for this |> process1.minimumOf(f)
.
Alias for this |> process1.minimumOf(f)
.
Run p2
after this Process
completes normally, or in the event of an error.
Run p2
after this Process
completes normally, or in the event of an error.
This behaves almost identically to append
, except that p1 append p2
will
not run p2
if p1
halts with an Error
or is killed. Any errors raised by
this
are reraised after p2
completes.
Note that p2
is made into a finalizer using asFinalizer
, so we
can be assured it is run even when this Process
is being killed
by a downstream consumer.
If this Process
completes with an error, call f
to produce
the next state.
If this Process
completes with an error, call f
to produce
the next state. f
is responsible for reraising the error if that
is the desired behavior. Since this function is often used for attaching
resource deallocation logic, the result of f
is made into a finalizer
using asFinalizer
, so we can be assured it is run even when this Process
is being killed by a downstream consumer.
When this Process
halts, call f
to produce the next state.
When this Process
halts, call f
to produce the next state.
Note that this function may be used to swallow or handle errors.
Attach supplied process only if process has been killed.
Attach supplied process only if process has been killed.
Since this function is often used for attaching resource
deallocation logic, the result of f
is made into a finalizer
using asFinalizer
, so we can be assured it is run even when
this Process
is being killed by a downstream consumer.
Alias for this |> Process.await1
.
Alias for this |> Process.await1
.
Like attempt
, but accepts a partial function.
Like attempt
, but accepts a partial function. Unhandled errors are rethrown.
Feed the output of this Process
as input of p1
.
Feed the output of this Process
as input of p1
. The implementation
will fuse the two processes, so this process will only generate
values as they are demanded by p1
. If p1
signals termination, this
is killed with same reason giving it an opportunity to cleanup.
Alias for this |> process1.prefixSums
Alias for this |> process1.prefixSums
Prepend a sequence of elements to the output of this Process
.
Prepend a sequence of elements to the output of this Process
.
Alias for this |> process1.reduce(f)
.
Alias for this |> process1.reduce(f)
.
Alias for this |> process1.reduceMap(f)(M)
.
Alias for this |> process1.reduceMap(f)(M)
.
Alias for this |> process1.reduceMonoid(M)
.
Alias for this |> process1.reduceMonoid(M)
.
Alias for this |> process1.reduceSemigroup(M)
.
Alias for this |> process1.reduceSemigroup(M)
.
Alias for this |> process1.repartition(p)(S)
Alias for this |> process1.repartition(p)(S)
Alias for this |> process1.repartition2(p)(S)
Alias for this |> process1.repartition2(p)(S)
Run this process until it halts, then run it again and again, as
long as no errors or Kill
occur.
Run this process until it halts, then run it again and again, as
long as no errors or Kill
occur.
Run this Process
, purely for its effects.
Run this Process
, purely for its effects.
Collect the outputs of this Process[F,O]
into a Monoid B
, given a Monad[F]
in
which we can catch exceptions.
Collect the outputs of this Process[F,O]
into a Monoid B
, given a Monad[F]
in
which we can catch exceptions. This function is not tail recursive and
relies on the Monad[F]
to ensure stack safety.
Run this Process
solely for its final emitted value, if one exists.
Run this Process
solely for its final emitted value, if one exists.
Run this Process
solely for its final emitted value, if one exists, using o2
otherwise.
Run this Process
solely for its final emitted value, if one exists, using o2
otherwise.
Collect the outputs of this Process[F,O]
, given a Monad[F]
in
which we can catch exceptions.
Collect the outputs of this Process[F,O]
, given a Monad[F]
in
which we can catch exceptions. This function is not tail recursive and
relies on the Monad[F]
to ensure stack safety.
Alias for this |> process1.scan(b)(f)
.
Alias for this |> process1.scan(b)(f)
.
Alias for this |> process1.scan1(f)
.
Alias for this |> process1.scan1(f)
.
Alias for this |> process1.scan1Map(f)(M)
.
Alias for this |> process1.scan1Map(f)(M)
.
Alias for this |> process1.scan1Monoid(M)
.
Alias for this |> process1.scan1Monoid(M)
.
Alias for this |> process1.scanMap(f)(M)
.
Alias for this |> process1.scanMap(f)(M)
.
Alias for this |> process1.scanMonoid(M)
.
Alias for this |> process1.scanMonoid(M)
.
Alias for this |> process1.scanSemigroup(M)
.
Alias for this |> process1.scanSemigroup(M)
.
Alias for this |> process1.shiftRight(head)
Alias for this |> process1.shiftRight(head)
Delay running this Process
until awaken
becomes true for the first time.
Delay running this Process
until awaken
becomes true for the first time.
Alias for this |> process1.sliding(n)
.
Alias for this |> process1.sliding(n)
.
Alias for this |> process1.split(f)
Alias for this |> process1.split(f)
Alias for this |> process1.splitOn(p)
Alias for this |> process1.splitOn(p)
Alias for this |> process1.splitWith(f)
Alias for this |> process1.splitWith(f)
Alias for this |> process1.stateScan(init)(f)
.
Alias for this |> process1.stateScan(init)(f)
.
Run one step of an incremental traversal of this Process
.
Run one step of an incremental traversal of this Process
.
This function is mostly intended for internal use. As it allows
a Process
to be observed and captured during its execution,
users are responsible for ensuring resource safety.
Alias for this |> process1.sum
Alias for this |> process1.sum
p.suspendStep
propagates exceptions to p
.
p.suspendStep
propagates exceptions to p
.
For anly process terminating with Kill
, this swallows the Kill
and replaces it with End
termination
For anly process terminating with Kill
, this swallows the Kill
and replaces it with End
termination
Alias for this |> process1.tail
.
Alias for this |> process1.tail
.
Alias for this |> process1.take(n)
.
Alias for this |> process1.take(n)
.
Alias for this |> process1.takeRight(n)
.
Alias for this |> process1.takeRight(n)
.
Alias for this |> process1.takeThrough(f)
.
Alias for this |> process1.takeThrough(f)
.
Alias for this |> process1.takeWhile(f)
.
Alias for this |> process1.takeWhile(f)
.
Use a Tee
to interleave or combine the outputs of this
and
p2
.
Use a Tee
to interleave or combine the outputs of this
and
p2
. This can be used for zipping, interleaving, and so forth.
Nothing requires that the Tee
read elements from each
Process
in lockstep. It could read fifty elements from one
side, then two elements from the other, then combine or
interleave these values in some way, etc.
If at any point the Tee
awaits on a side that has halted,
we gracefully kill off the other side, then halt.
If at any point t
terminates with cause c
, both sides are killed, and
the resulting Process
terminates with c
.
Alias for this |> process1.terminated
.
Alias for this |> process1.terminated
.
Translate the request type from F
to G
, using the given polymorphic function.
Translate the request type from F
to G
, using the given polymorphic function.
Remove any leading emitted values from this Process
.
Remove any leading emitted values from this Process
.
Removes all emitted elements from the front of this Process
.
Removes all emitted elements from the front of this Process
.
The second argument returned by this method is guaranteed to be
an Await
, Halt
or an Append
-- if there are multiple Emit'
s at the
front of this process, the sequences are concatenated together.
If this Process
does not begin with an Emit
, returns the empty
sequence along with this
.
Halts this Process
as soon as condition
becomes true
.
Halts this Process
as soon as condition
becomes true
. Note that condition
is checked before each and every read from this
, so condition
should return
very quickly or be continuous to avoid holding up the output Process
. Use
condition.forwardFill
to convert an infrequent discrete Process
to a
continuous one for use with this function.
When condition
is true
, lets through any values in this
process, otherwise blocks
until condition
becomes true again.
When condition
is true
, lets through any values in this
process, otherwise blocks
until condition
becomes true again. Note that the condition
is checked before
each and every read from this
, so condition
should return very quickly or be
continuous to avoid holding up the output Process
. Use condition.forwardFill
to
convert an infrequent discrete Process
to a continuous one for use with this
function.
Call tee
with the zip
Tee[O,O2,O3]
defined in tee.scala
.
Call tee
with the zip
Tee[O,O2,O3]
defined in tee.scala
.
Call tee
with the zipWith
Tee[O,O2,O3]
defined in tee.scala
.
Call tee
with the zipWith
Tee[O,O2,O3]
defined in tee.scala
.
Alias for this |> process1.zipWithIndex[A,N]*
.
Alias for this |> process1.zipWithIndex[A,N]*
.
Alias for this |> process1.zipWithIndex[A]*
.
Alias for this |> process1.zipWithIndex[A]*
.
Alias for this |> process1.zipWithNext
.
Alias for this |> process1.zipWithNext
.
Alias for this |> process1.zipWithPrevious
.
Alias for this |> process1.zipWithPrevious
.
Alias for this |> process1.zipWithPreviousAndNext
.
Alias for this |> process1.zipWithPreviousAndNext
.
Alias for this |> process1.zipWithScan(z)(next)
.
Alias for this |> process1.zipWithScan(z)(next)
.
Alias for this |> process1.zipWithScan(z)(next)
.
Alias for this |> process1.zipWithScan(z)(next)
.
Alias for this |> process1.zipWithState(z)(next)
.
Alias for this |> process1.zipWithState(z)(next)
.
Operator alias for pipe
.
Operator alias for pipe
.
The
Halt
constructor instructs the driver that the last evaluation of Process completed with supplied cause.