0.2.0 Preview 1 · Frozen documentation
Share
Promotes an explicitly moved unique operation into repeated shared observation.
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.
Share
pub fn Share<T>(mut Work: Task<T>) -> SharedTask<T>Promotes an explicitly moved unique operation into repeated shared observation. T: Owned completion type preserved without copying its result. Work: Unique owner explicitly transferred by the caller; local input becomes empty. Return: Shared owner of the same frame without another control allocation. Warning: Empty, already-consumed or invalid promotion follows the fatal misuse policy.
Documentation snapshot: October 24, 2026 About versions ↗