Class SlimLock
A SemaphoreSlim based lock implementation
Implements
Inherited Members
Namespace: Microsoft.Graph.Communications.Common
Assembly: Microsoft.Graph.Communications.Common.dll
Syntax
public sealed class SlimLock : Disposable, IDisposable
Constructors
SlimLock()
Declaration
public SlimLock()
Methods
Dispose(Boolean)
Protected implementation of dispose. This will be triggered only once regardless if manually disposed or garbage collected.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing |
|
Overrides
Lock()
Acquire a disposable lock
Declaration
public IDisposable Lock()
Returns
Type | Description |
---|---|
IDisposable | Disposable cleanup to release semaphore. |
LockAsync()
Acquire a disposable lock
Declaration
public Task<IDisposable> LockAsync()
Returns
Type | Description |
---|---|
Task<IDisposable> | Disposable cleanup to release semaphore. |