This page looks best with JavaScript enabled

Rust::Channels

 ·  ☕ 1 min read

Flavors:

  • Synchronous channels: Channel where send() can block. Limited capacity.
    • Mutex + Condvar + VecDeque
    • Atomic VecDeque (atomic queue) + thread::pack + thread::Thread::notify
  • Asynchronous channels: Channel where send() cannot block. Unbounded.
    • Mutex + Condvar + VecDeque
    • Mutex + Condvar + LinkedList
    • AtomicLinkedList or Atomic Queue
    • Atomic linked list, linked list of T
    • Atomic block linked list, linked of atomic VecDeque
  • Rendezvous channels: Synchronous with capacity = 0. Used for thread synchronization.
  • Oneshot channels: Any capacity. In practice, only one call to send().
Share on

James
WRITTEN BY
James
Unity Developer