Table of Contents

Struct AsyncLock.Releaser

Namespace
CryptoHives.Foundation.Threading.Async.Pooled
Assembly
CryptoHives.Foundation.Threading.dll

A small value type returned by awaiting a lock acquisition. Disposing the releaser releases the lock.

public readonly struct AsyncLock.Releaser : IDisposable, IAsyncDisposable, IEquatable<AsyncLock.Releaser>
Implements
Inherited Members

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

public ValueTask DisposeAsync()

Returns

ValueTask

Equals(Releaser)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(AsyncLock.Releaser other)

Parameters

other AsyncLock.Releaser

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Operators

operator ==(Releaser, Releaser)

Determines whether two AsyncLock.Releaser instances are equal.

public static bool operator ==(AsyncLock.Releaser left, AsyncLock.Releaser right)

Parameters

left AsyncLock.Releaser

The first Releaser to compare.

right AsyncLock.Releaser

The second Releaser to compare.

Returns

bool

true if the specified Releaser instances are equal; otherwise, false.

operator !=(Releaser, Releaser)

Determines whether two AsyncLock.Releaser instances are not equal.

public static bool operator !=(AsyncLock.Releaser left, AsyncLock.Releaser right)

Parameters

left AsyncLock.Releaser

The first Releaser to compare.

right AsyncLock.Releaser

The second Releaser to compare.

Returns

bool

false if the specified Releaser instances are equal; otherwise, true.