Crate async_unsync

source ·
Expand description

async-unsync - Asynchronous channels for single-threaded use.

This crate provides asynchronous but unsynchronized (!Sync) alternatives to tokio::sync::mpsc channel types with almost identical APIs.

Using synchronized data-structures in context that are statically known to always execute on a single thread has non-trivial overhead. The specialized (and much simpler) implementations in this library are primarily intended for use in high-performance async code utilizing thread local tasks and !Send futures.

Modules§

  • A bounded MPSC channel implementation.
  • An unsync oneshot channel implementation.
  • A simple asynchronous semaphore for limiting and sequencing access to arbitrary shared resources.
  • An unbounded MPSC channel implementation.

Structs§

  • An error which can occur when sending a value through a closed channel.

Enums§

  • An error which can occur when receiving on a closed or empty channel.
  • An error which can occur when sending a value through a closed or full channel.