Create a pair of linear I/O channel endpoints, for local use.
Spawn two functions as threads communicating via a pair of local channel endpoints.
Spawn two functions as threads communicating via a pair of local channel endpoints.
This method invokes factory to create a pair of channel endpoints
(in,out)
, and then spawns p1(in)
and p2(out)
.
Function using the input channel endpoint
Function using the output channel endpoint
Execution context where the p1
and p2
will run
A pair of Future
s (f1, f2)
, completed respectively when
p1(in)
and p2(out)
terminate.
Simple implementation of local channel endpoints, based on Scala
Promise
s/Future
s.