OxL Reference

method Arc.new

A new atomically counted pointer to value.

Example:

oxl✓ checked in CI
fn main() io {
  let a: Arc<frozen List<i64>> = Arc.new([1, 2])
  print("{a.len()}")
}
Output
2
pub(api) static fn new(value: T) -> Arc<T>

Since. 1.0.0-beta

Parameters

NameType
valueT

Returns

Arc<T>

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/task.oxl:197

See also