[][src]Crate piper

Piper

Async pipes, channels, mutexes, and more.

NOTE: This crate is still a work in progress. Coming soon.

  • Arc and Mutex - same as std except they implement asyncread/asyncwrite
  • Event - for notifying async tasks and threads, advanced AtomicWaker
  • Lock - async lock
  • chan - Sender and Receiver implement Sink and Stream
  • pipe - Reader and Writer implement AsyncRead and AsyncWrite

TODO's

  • change w.await to listener.await

Structs

Arc

A reference-counted pointer that implements async I/O traits.

Event

A synchronization primitive for notifying async tasks and threads.

EventListener

A guard waiting for a notification from an Event.

Lock

An asynchronous lock.

LockGuard

A guard that releases the lock when dropped.

Mutex

A mutex that implements async I/O traits.

MutexGuard

A guard that releases the mutex when dropped.

Reader

The reading side of a pipe.

Receiver

The receiving side of a channel.

Sender

The sending side of a channel.

Writer

The writing side of a pipe.

Functions

chan

Creates a bounded multi-producer multi-consumer channel.

pipe

Creates a bounded single-producer single-consumer pipe.