Table of Contents

Struct AsyncKeyedReaderWriterLockUpgradedReadToken<TKey>

Namespace
LfrlAnvil.Async
Assembly
LfrlAnvil.Core.dll

Represents an acquired read lock upgraded to the write level from an AsyncKeyedReaderWriterLock<TKey> instance.

public readonly struct AsyncKeyedReaderWriterLockUpgradedReadToken<TKey> : IDisposable where TKey : notnull

Type Parameters

TKey

Key's type.

Implements
Inherited Members
Extension Methods

Properties

Key

Associated key.

public TKey? Key { get; }

Property Value

TKey

Lock

Associated AsyncKeyedReaderWriterLock<TKey> instance.

public AsyncKeyedReaderWriterLock<TKey>? Lock { get; }

Property Value

AsyncKeyedReaderWriterLock<TKey>

Methods

Dispose()

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

public void Dispose()

Exceptions

InvalidOperationException

When this upgraded read lock has already been downgraded.

GetReadToken()

Creates an upgradeable read lock token associated with this upgraded read lock.

[Pure]
public AsyncKeyedReaderWriterLockUpgradeableReadToken<TKey> GetReadToken()

Returns

AsyncKeyedReaderWriterLockUpgradeableReadToken<TKey>

New AsyncKeyedReaderWriterLockUpgradeableReadToken<TKey> instance.