Crate rendezvous

source ·
Expand description

A rendezvous-based channel for synchronous Inter-Task Communication (ITC).

This crate offers a rendezvous channel, in which two tasks can exchange messages without an intermediary buffer. The sender and receiver tasks must rendezvous together to exchange data, so at least one of them must block.

Only Send types can be sent or received through the channel.

This is not a zero-copy channel; to avoid copying large messages, use a reference type like Box or another layer of indirection.

TODO: add support for a queue of pending senders and receivers so that we can enable MPMC (multi-producer multi-consumer) behavior that allows senders and receivers to be cloned. Note that currently only a single receiver and single sender is supported.

Structs

  • The receiver side of a channel.
  • The sender (transmit) side of a channel.

Functions

  • Creates a new rendezvous channel with the default deadlock prevention method.
  • Creates a new rendezvous channel with the specified deadlock prevention method.