Struct AsyncLock.Scope
Represents acquired asynchronous lock.
Implements
Inherited Members
Namespace: DotNext.Threading
Assembly: DotNext.Threading.dll
Syntax
public struct AsyncLock.Scope : IDisposable
Remarks
The lock can be released by calling Dispose().
Properties
View SourceIsEmpty
Gets a value indicating that this object doesn't hold the lock.
Declaration
public readonly bool IsEmpty { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
View SourceDispose()
Releases the acquired lock.
Declaration
public void Dispose()
Remarks
This object is not reusable after calling of this method.
Operators
View Sourceimplicit operator bool(in Scope)
Indicates that the object holds successfully acquired lock.
Declaration
public static implicit operator bool(in AsyncLock.Scope scope)
Parameters
| Type | Name | Description |
|---|---|---|
| AsyncLock.Scope | scope | The lock holder. |
Returns
| Type | Description |
|---|---|
| bool | true, if the object holds successfully acquired lock; otherwise, false. |