PgLwLockShareGuard<THeader, TElement>
Namespace: Ankus
Assembly: Ankus.Runtime.dll
Holds shared read access to a lock-protected header and its elements until disposal or callback exit.
public sealed class PgLwLockShareGuard<THeader, TElement> : IDisposable where THeader : unmanaged where TElement : unmanagedType parameters:
THeader
The unmanaged header.
TElement
The unmanaged element.
Inheritance: object
Implements: IDisposable
Methods
Section titled “Methods”Dispose()
Section titled “Dispose()”Releases this guard once.
public void Dispose()Read<TResult>(PgSharedArrayReader<THeader, TElement, TResult>)
Section titled “Read<TResult>(PgSharedArrayReader<THeader, TElement, TResult>)”Reads the original header and elements through references limited to the synchronous callback.
public TResult Read<TResult>(PgSharedArrayReader<THeader, TElement, TResult> reader)Type parameters:
TResult
The owned callback result.
Parameters:
reader — PgSharedArrayReader<THeader, TElement, TResult>
The reader, whose references cannot escape the callback.
Returns: TResult
The callback result.
Properties
Section titled “Properties”Header
Section titled “Header”Gets a copy of the header while this guard holds the lock.
public THeader Header { get; }Value: THeader
this[int]
Section titled “this[int]”Gets a copy of an element while this guard holds the lock.
public TElement this[int index] { get; }Parameters:
index — int
The zero-based element index.
Value: TElement
The element.
Length
Section titled “Length”Gets the number of elements.
public int Length { get; }Value: int