method Arc.new
A new atomically counted pointer to value.
Example:
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
| Name | Type |
|---|---|
value | T |
Returns
Arc<T>
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/task.oxl:197