Skip to content
API referenceDevelopmentEngine APIEngine ccf7d03f
Synced
  • Pins an existing generation against exclusive retirement while permitting other readers.

API: engine
Project: Inno.Core.IO

public static System.Threading.Tasks.ValueTask<Inno.Core.IO.FileLease> Inno.Core.IO.FileLease.AcquireSharedAsync(string path, System.TimeSpan timeout, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))

Parameter path: The absolute persistent lease path previously initialized by an exclusive owner.

Parameter timeout: The maximum wait, or F:System.Threading.Timeout.InfiniteTimeSpan for no time limit.

Parameter cancellationToken: Cancels waiting before ownership is returned.

A shared lease; an exclusive lease cannot be acquired until every reader releases ownership.

Exception T:System.IO.FileNotFoundException: The owner has not initialized the persistent lease file.

Exception T:System.TimeoutException: An exclusive owner retains the file beyond the permitted wait.

Exception T:System.OperationCanceledException: Waiting was canceled; no lease is returned.