Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
Development · Evolving reference

SemaphoreError

Portable semaphore operation/setup failures; try contention is a bool. InvalidCount and LimitExceeded commit nothing. Closed cannot revoke already acquired permits.

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.

SemaphoreError

pub enum SemaphoreError

Portable semaphore operation/setup failures; try contention is a bool. InvalidCount and LimitExceeded commit nothing. Closed cannot revoke already acquired permits.

SemaphoreError.AllocationFailure

AllocationFailure;

Native record allocation failed.

SemaphoreError.ResourceUnavailable

ResourceUnavailable;

Provider could not reserve resources.

SemaphoreError.NativeFailure

NativeFailure;

Other provider operation failure.

SemaphoreError.InvalidCount

InvalidCount;

Maximum is zero or initial exceeds maximum.

SemaphoreError.LimitExceeded

LimitExceeded;

Full release would exceed maximum.

SemaphoreError.Closed

Closed;

Close won before the operation committed.

SemaphoreError.EmptyOwner

EmptyOwner;

Default/moved owner has no semaphore.

SemaphoreError.Cancelled

Cancelled;

Cancellation removed a still-pending wait, consuming no permit.

SemaphoreError.InvalidConfiguration

InvalidConfiguration;

Selected executor has invalid configuration.

SemaphoreError.StartupFailure

StartupFailure;

Selected worker startup failed transactionally.

SemaphoreError.ExecutorClosed

ExecutorClosed;

Selected executor rejected admission after shutdown.

SemaphoreError.QueueFull

QueueFull;

Selected executor admission capacity is full.

SemaphoreError.RetentionUnavailable

RetentionUnavailable;

Required frame/continuation retention cannot be reserved.

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