Under heavy development. This site describes the intended 1.0 language. Current features and performance vary. Development status
Sn50SnThe SnAPI programming language
0.2.0 Preview 1 · Frozen documentation

WhenAnyError

Classifies completion-only wait failure without changing input ownership.

Sn is under heavy development. Reference extracted from this release’s bundled standard library. Public API examples are not an exhaustive compatibility test. Read the matching release guide for tested workflows and limitations. Read the status →

Module std.task

import std.task;

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

WhenAnyError

pub enum WhenAnyError

Classifies completion-only wait failure without changing input ownership.

WhenAnyError.NoTasks

NoTasks;

There is no input whose completion can win.

WhenAnyError.InvalidTask

InvalidTask;

At least one input handle is empty.

WhenAnyError.AllocationFailed

AllocationFailed;

Native stable wait-set storage cannot be allocated.

WhenAnyError.Closed

Closed;

Runtime root/executor admission is closed.

WhenAnyError.RetentionUnavailable

RetentionUnavailable;

Native frame lifetime cannot be retained for registration.

WhenAnyError.Cancelled

Cancelled;

Only this aggregate wait was cancelled before publication.

WhenAnyError.InvalidConfiguration

InvalidConfiguration;

Captured executor configuration is invalid.

WhenAnyError.StartupFailed

StartupFailed;

Lazy worker startup failed transactionally.

WhenAnyError.StorageFailure

StorageFailure;

Private preparation storage failed; input owners/results remain unchanged.

WhenAnyError.StorageFailure.Reason

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