Module Extended.OwnedSource
type 'a
t : (value mod contended forkable many portable unyielding) with 'a @@ contended portableA capsule that uses uniqueness tracking to enable different threads to gain uncontended access to its contents at different times without need for runtime synchronization.
create f runs f within a fresh capsule, and creates a Capsule.Owned.t containing the result.
freeze t takes an aliased owned capsule (which can no longer be written to since it isn't unique) and converts it to a Frozen.t.
unwrap t consumes a unique isolated capsule t and returns the underlying value, merging the capsule with the current capsule.
val get_contended :
('a : value mod aliased portable). 'a t @ unique ->
#('a t * 'a) @ unique contendedProject out a contended reference to the underlying value from a unique t, returning the unique t back alongside the alias to the underlying value.
val with_ :
('a : value mod aliased) ('b : value mod contended portable). 'a t @ unique ->
f:('a -> 'b @ unique) @ local once portable ->
#('a t * 'b) @ uniquewith_ t ~f takes a unique isolated capsule t, calls f with its value, and returns a tuple of the unique isolated capsule and the result of f.