Skip to content

PgSharedMutator<T, TResult>

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Updates an exclusively protected unmanaged value through a reference limited to the synchronous callback.

public delegate TResult PgSharedMutator<T, out TResult>(scoped ref T value) where T : unmanaged

Type parameters:

T

The unmanaged protected value.

TResult

The owned result returned by the callback.

Parameters:

value — T

The original protected value, valid only during this callback.

Returns: TResult

The callback’s owned result.

Writes take effect immediately, including when the callback throws. Nested spinlocks cannot be acquired or queried while this mutable reference is active. Use a separate guard Read callback for those operations while retaining the same parent guard.