Module Async_parallel_deprecated.Channel

A Channel.t is a bi-directional communication channel for communicating to a Hub.t. Channels are portable across processes. A channel can be sent to another process, either explicitly or by being in a closure and it will continue to work.

type ('to_hub, 'from_hub) t
val create : ?⁠buffer_age_limit:[ `At_most of Core.Time.Span.t | `Unlimited ] ‑> addr:(Async.Unix.Inet_addr.t * int) ‑> unit ‑> (__t Async.Deferred.t

create is type-unsafe, and should not be used by user code.

val close : (__t ‑> unit Async.Deferred.t
val read : (_'bt ‑> 'b Async.Deferred.t
val read_full : (_'bt ‑> 'b Async.Reader.Read_result.t Async.Deferred.t
val write : ('a_t ‑> 'a ‑> unit
type 'a pre_packed
val pre_pack : 'a ‑> 'a pre_packed
val write_pre_packed : ('a_t ‑> 'a pre_packed ‑> unit
val flushed : (__t ‑> unit Async.Deferred.t
val socket : (__t ‑> Async.Unix.Inet_addr.t * int
val errors : (__t ‑> exn Async.Stream.t

Similar to Monitor.detach_and_get_error_stream, collects all writer errors. If this function has never been called, then exceptions will be raised directly