Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
Snapshot · Oct 24, 2026 · Frozen documentation

AsyncMutexState

Transfers initialized permit/payload before publication.

Sn is under heavy development. This reference includes the intended 1.0 design; features may be incomplete in the current compiler. Read the status →

Module std.sync

import std.sync;

Public declaration contracts and authored examples. A page can document several related symbols. Implementation bodies are excluded.

pub init(mut Gate: Semaphore, mut Value: T)

pub init(mut Gate: Semaphore, mut Value: T)

Transfers initialized permit/payload before publication. Gate: Owned one-permit semaphore. Value: Owned protected payload.

pub init(Source: readonly Self&) = delete;

pub init(Source: readonly Self&) = delete;

Rejects duplicating payload/permit authority. Source: Existing state.

pub init(Source: mut Self&&)

pub init(Source: mut Self&&)

Transfers unpublished state and recomputes its new payload address. Source: Transferred state left without permit authority.

Gate

pub readonly fn Gate() -> readonly Semaphore&

Borrows private permit protocol while retained state is live. Return: Readonly semaphore reference bounded by this retained state lifetime.

BorrowValue

pub readonly fn BorrowValue() -> mut T&

Authorizes private interior payload access only under an acquired guard. Return: Writable payload reference expiring at guard release.

TakeValue

pub fn TakeValue() -> T

Recovers uninserted input after shared allocation fails. Return: Owned input; failed state remains destructible.

Documentation snapshot: October 24, 2026 About versions ↗
Searching Development · language & standard library