Return a pair of input/output linear channel endpoints
Send a message.
Send a message.
Message to be sent
AlreadyUsed
if the channel endpoint was already used for output
Alias for send.
Create a pair of U
-typed channel endpoints (i,o)
,
send the return value of f(o)
, and return i
.
Create a pair of U
-typed channel endpoints (i,o)
,
send the return value of f(o)
, and return i
.
This method automates channel creation in continuation-passing-style
protocols,
when the output endpoint must be sent as part of a T
-typed message
(as returned by f(i)
),
and the
endpoint is later used to continue the interaction.
input
Function that, when applied to an output channel endpoint, returns the message to be sent.
Create a pair of U
-typed channel endpoints (i,o)
,
send the return value of f(i)
, and return o
.
Create a pair of U
-typed channel endpoints (i,o)
,
send the return value of f(i)
, and return o
.
This method automates channel creation in continuation-passing-style
protocols,
when the input endpoint must be sent as part of a T
-typed message
(as returned by f(i)
),
and the
endpoint is later used to continue the interaction.
output
Function that, when applied to an input channel endpoint, returns the message to be sent.
Return a pair of input/output linear channel endpoints, with the input one meant to be used to receive a value, and the output meant to be sent as continuation within a session.
Return a pair of input/output linear channel endpoints, with the input one meant to be used to receive a value, and the output meant to be sent as continuation within a session.
This method is mainly used internally,
e.g. by !!
.
The main difference wrt. create is that
the returned channel endpoints might be optimized
for the use described above; as a consequence,
their behavior is undefined for other uses
(e.g., if the input endpoint is sent as continuation in a session).
The default implementation is an alias for create[U]()*. Only use and/or override this method if you really know what you are doing.
Return a pair of input/output linear channel endpoints, with the input one meant to be sent as continuation within session, and the output meant to be used to send a value.
Return a pair of input/output linear channel endpoints, with the input one meant to be sent as continuation within session, and the output meant to be used to send a value.
This method is the "dual" of createContIn, and similar remarks hold.
Return a promise that, once completed with a value v
,
causes v
to be sent along this channel endpoint.
Base abstract class for output channel endpoints.