Skip to content

std::sync

Status: experimental

Synchronisation primitives beyond channels.

API details and source

The implementation source contains the complete declarations and implementation notes. The table below lists canonical Gossamer call signatures; every item name links directly to its implementation file.

Item Canonical signature or declaration Description
AtomicBool type AtomicBool Atomic boolean.
AtomicI64 type AtomicI64 Atomic 64-bit signed integer.
AtomicU64 type AtomicU64 Atomic 64-bit unsigned integer.
Barrier type Barrier Synchronisation barrier across goroutines.
Mutex type Mutex Mutual-exclusion lock.
Once type Once One-shot initialisation latch.
RwLock type RwLock Reader-writer lock.
WaitGroup type WaitGroup Counts goroutines and waits for them to finish.
channel fn channel<T>(capacity: i64) -> sync::Channel<T> Creates a typed channel, returning (Sender, Receiver).
channel_unbounded fn channel_unbounded<T>() -> sync::Channel<T> Creates an explicit unbounded typed channel, returning (Sender, Receiver).