Skip to content
API referenceDevelopmentEngine APIEngine ccf7d03f
Synced
  • Acquires owner reading rights before opening or waiting for a leaf lease.

API: engine
Project: Inno.Core.IO

public static System.Threading.Tasks.ValueTask<Inno.Core.IO.CoordinatedFileLease> Inno.Core.IO.CoordinatedFileLease.AcquireAsync(string coordinationPath, string leafPath, System.TimeSpan timeout, bool shared = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))

Parameter coordinationPath: The persistent owner gate, never removed by retirement.

Parameter leafPath: A distinct leaf path within the same owner boundary.

Parameter timeout: The complete wait budget, or infinite.

Parameter shared: Whether the leaf permits simultaneous readers.

Parameter cancellationToken: Cancellation while waiting for either gate.

Ownership retaining both gates until disposal.

Exception T:System.ArgumentException: A path is relative, the leaf escapes its owner, or the budget is invalid.

Exception T:System.TimeoutException: The complete wait budget expires.

Exception T:System.OperationCanceledException: The caller cancels before ownership is returned.