Module Extended.FrozenSource
Source
type 'a
t : (value mod contended forkable many portable unyielding) with 'a portable @@ contended portableA frozen value in its own capsule. Nobody may write to the contained 'a without synchronization, so everyone may read from it.
This type is useful for locally initializing some mutable data structure, then permanently freezing it to give read access to multiple threads.
Note that types which are sync_data, such as atomic references, may still be mutated when stored in a Capsule.Frozen.t.
create f runs f within a fresh capsule, and creates a Capsule.Frozen.t containing the result.