This is unreleased documentation for Yew Next version.
For up-to-date documentation, see the latest version on docs.rs.

Module pinned

Expand description

Task synchronisation primitives for pinned tasks.

This module provides the following task synchronisation mechanisms for !Send futures:

  • Barrier: Ensures multiple tasks to wait until all tasks have reached a point in the program before continuing execution of all together.
  • RwLock: Provides a mutual exclusion mechanism which allows multiple readers at the same time, while allowing only one writer at a time.
  • mpsc: A channel that supports sending multiple values from multiple producers to a single receiver.
  • oneshot: A channel to send one single value from a producer to a receiver.

Modules§

mpsc
A multi-producer, single-receiver channel.
oneshot
A channel that can pass one single value from a sender to a receiver.

Structs§

Barrier
A barrier enables multiple tasks to synchronise the beginning of some computation.
BarrierWaitResult
A BarrierWaitResult is returned by wait when all tasks in the Barrier have rendezvoused.
RwLock
An asynchronous reader-writer lock.
RwLockReadGuard
RAII structure used to release the shared read access of a lock when dropped.
RwLockWriteGuard
RAII structure used to release the exclusive write access of a lock when dropped.
TryLockError
Error returned from the RwLock::try_read and RwLock::try_write functions.

Type Aliases§

TryLockResult
A type alias for the result of a nonblocking locking method.