Module Gc.SafeSource
Submodule containing non-backwards-compatible functions which enforce thread safety via modes.
val finalise :
('a @ portable contended -> unit) @ portable ->
'a @ portable contended ->
unitLike finalise, but can be called on any domain. In the presence of multiple domains it should be assumed that any particular finaliser may be executed in any of the domains.
The provided closure must be portable as it may run on any domain. It must take its argument contended as the domain it's finalised on may not be the same capsule that has uncontended access to it.
The provided value must be portable as it may have been created inside a capsule, in which case it needs to cross a capsule boundary to be finalised.
Like finalise_last, but can be called on any domain. In the presence of multiple domains it should be assumed that any particular finaliser may be executed in any of the domains.
The provided closure must be portable as it may run on any domain.
The provided value may be nonportable as it is not passed to the provided closure.
Like create_alarm, but can be called on any domain and in particular from within any capsule.
The provided closure must be portable as it might close over data from the current capsule, but will be called on the current domain, regardless of whether the current domain still has uncontended access to the original capsule.