LockOptions Class

The options of LockManager.Request (https://w3c.github.io/web-locks/#dictdef-lockoptions).

public sealed class LockOptions

Constructors

NameDescription
LockOptions()

LockOptions()

LockManager.cs
public LockOptions()

No documentation is available.

Properties

NameDescription
IfAvailableGets whether the callback is called with null, instead of waiting, when the lock cannot be granted at once.
ModeGets the mode of the lock.
SignalGets the signal that aborts the request while the lock is not granted.
StealGets whether the held locks of the resource are released (their requests fail with an AbortError) and the lock is granted before the pending requests.

IfAvailable

LockManager.cs

Gets whether the callback is called with null, instead of waiting, when the lock cannot be granted at once.

public bool IfAvailable { get; init; }

Gets the mode of the lock.

public LockMode Mode { get; init; }

Gets the signal that aborts the request while the lock is not granted.

public AbortSignal? Signal { get; init; }

Gets whether the held locks of the resource are released (their requests fail with an AbortError) and the lock is granted before the pending requests.

public bool Steal { get; init; }