Development · Evolving reference
Share
Promotes an explicitly moved unique operation into repeated shared observation.
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.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 ↗