keen/col/shared-array

Source
shared-array[t] record (has private fields)

Shared equivalent to 'mut-array'.

Iteration is not supported; since operations on this take a lock, they need to be short. If you need to iterate, you could use 'copy-to' or 'move-to' to get a snapshot of all the elements and iterate it at your leisure.

list-new[t] t shared-array(a t[])
size[t] nat64(a t shared-array)
is-empty[t] bool(a t shared-array)
to[t] t shared-array(a t[])
copy-to[t] t[](a t shared-array) unsafe
WARN: This holds the lock while copying the entire array. Consider using 'move-to' instead.
move-to[t] t shared-array(a t mut[])
move-to[t] t[](a t shared-array)
move-to[t] t mut[](a t shared-array)
clear[t] void(a t shared-array)
~=[t] void(a t shared-array, value t)
subscript[t] t(a t shared-array, index nat64)