The Await constructor instructs the driver to evaluate
req.
An effectful channel, to which we can send values and get back responses.
An effectful channel, to which we can send values and get back responses. Modeled as a source of effectful functions.
The Emit constructor instructs the driver to emit
the given sequence of values to the output.
Provides infix syntax for eval: Process[F,F[O]] => Process[F,O]
The Halt constructor instructs the driver to stop
due to the given Throwable.
This class provides infix syntax specific to Process0.
A single input stream transducer.
A single input stream transducer. Accepts input of type I,
and emits values of type O.
This class provides infix syntax specific to Process1.
A Process1 that writes values of type W.
Various Process functions that aren't worth putting on Process
due to variance issues.
An effectful sink, to which we can send values.
An effectful sink, to which we can send values. Modeled as a source of effectful functions.
This class provides infix syntax specific to Process[Task, _].
Evidence that F[x] <: G[x] for all x.
A stream transducer that can read from one of two inputs,
the 'left' (of type I) or the 'right' (of type I2).
A stream transducer that can read from one of two inputs,
the 'left' (of type I) or the 'right' (of type I2).
Process1[I,O] <: Tee[I,I2,O].
This class provides infix syntax specific to Tee.
A Tee that writes values of type W.
A Writer[F,W,O] is a Process[F, W \/ O].
A Writer[F,W,O] is a Process[F, W \/ O]. See
Process.WriterSyntax for convenience functions
for working with either the written values (the W)
or the output values (the O).
This is useful for logging or other situations where we
want to emit some values 'on the side' while doing something
else with the main output of a Process.
Infix syntax for working with Writer[F,W,O].
A stream transducer that can read from one of two inputs, nondeterministically.
A stream transducer that can read from one of two inputs, nondeterministically. This
This class provides infix syntax specific to Wye.
A Tee that writes values of type W.
Special exception indicating normal termination.
Writer based version of await1.
Writer based version of awaitBoth.
Writer based version of awaitL.
Writer based version of awaitR.
A discrete tasks which emits elapsed durations at the given regular duration.
A discrete tasks which emits elapsed durations at the given
regular duration. For example: awakeEvery(5 seconds) will
return (approximately) 5s, 10s, 20s, and will lie dormant
between emitted values. By default, this uses a shared
ScheduledExecutorService for the timed events, and runs the
actual callbacks on pool, which avoids blocking a useful
thread simply to interpret the delays between events.
The infinite Process, always emits a.
A continuous stream of the elapsed time, computed using System.nanoTime.
A continuous stream of the elapsed time, computed using System.nanoTime.
Note that the actual granularity of these elapsed times depends on the OS, for instance
the OS may only update the current time every ten milliseconds or so.
Emit a single value, then Halt.
Emit a sequence of values, then Halt.
A Writer which emits one value to the output.
Process.emitRange(0,5) == Process(0,1,2,3,4).
A Writer which writes the given value.
Evaluate an arbitrary effect in a Process.
Evaluate an arbitrary effect in a Process. The resulting
Process emits a single value. To evaluate repeatedly, use
repeateEval(t) or equivalently eval(t).repeat.
Evaluate an arbitrary effect once, purely for its effects, ignoring its return value.
Evaluate an arbitrary effect once, purely for its effects,
ignoring its return value. This Process emits no values.
A continuous stream which is true after d, 2d, 3d... elapsed duration.
A continuous stream which is true after d, 2d, 3d... elapsed duration.
If you'd like a discrete stream that will actually block until d has elapsed,
use awakeEvery instead.
A Process that halts due to the given exception.
A Process which emits n repetitions of a.
Feed the output of f back in as its input.
Feed the output of f back in as its input. Note that deadlock
can occur if f tries to read from the looped back input
before any output has been produced.
Produce a continuous stream from a discrete stream by using the most recent value.
A Process that halts due to normal termination.
Promote a Process to a Writer that writes nothing.
Promote a Process to a Writer that writes and outputs
all values of p.
Lazily produce the range [start, stopExclusive).
Lazily produce a sequence of nonoverlapping ranges, where each range
contains size integers, assuming the upper bound is exclusive.
Lazily produce a sequence of nonoverlapping ranges, where each range
contains size integers, assuming the upper bound is exclusive.
Example: ranges(0, 1000, 10) results in the pairs
(0, 10), (10, 20), (20, 30) ... (990, 1000)
Note: The last emitted range may be truncated at stopExclusive. For
instance, ranges(0,5,4) results in (0,4), (4,5).
Prefix syntax for p.repeat.
eval an arbitrary effect in a Process.
eval an arbitrary effect in a Process. The resulting Process will emit values
until evaluation of t signals termination with End or an error occurs.
A single-element Process that waits for the given number
of milliseconds before emitting its value.
A single-element Process that waits for the given number
of milliseconds before emitting its value. This uses a shared
ScheduledThreadPoolExecutor rather than calling Thread.sleep
on the main Process.
Delay running p until awaken becomes true for the first time.
Delay running p until awaken becomes true for the first time.
The awaken process may be discrete.
Produce a stream encapsulating some state, S.
Produce a stream encapsulating some state, S. At each step,
produces the current state, and an effectful function to set the
state that will be produced next step.
A supply of Long values, starting with initial.
A supply of Long values, starting with initial.
Each read is guaranteed to retun a value which is unique
across all threads reading from this supply.
Produce p lazily, guarded by a single Await.
Produce p lazily, guarded by a single Await. Useful if
producing the process involves allocation of some mutable
resource we want to ensure is accessed in a single-threaded way.
A Writer which writes the given value; alias for emitW.
Convert a Process to a Task which can be run repeatedly to generate
the elements of the Process.
Produce a (potentially infinite) source from an unfold.
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. While condition is true, the returned Process
will listen asynchronously for the condition to become false again. There is infix
syntax for this as well, p.when(condition) has the same effect.
Obtain an equality witness from an Is request.
Obtain an equality witness from a T request.
Obtain an equality witness from a Y request.