Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ protected virtual bool IsUnsupportedSynchronizationContext
/// a canceled token will cause the code that is waiting for the lock to resume with an <see cref="OperationCanceledException"/>.
/// </param>
/// <returns>An awaitable object whose result is the lock releaser.</returns>
/// <exception cref="InvalidOperationException">Thrown when <see cref="Complete"/> has been called and this is a new top-level lock request.</exception>
public Awaitable ReadLockAsync(CancellationToken cancellationToken = default(CancellationToken))
{
return new Awaitable(this, LockKind.Read, LockFlags.None, cancellationToken);
Expand All @@ -428,13 +429,14 @@ protected virtual bool IsUnsupportedSynchronizationContext
/// a canceled token will cause the code that is waiting for the lock to resume with an <see cref="OperationCanceledException"/>.
/// </param>
/// <returns>An awaitable object whose result is the lock releaser.</returns>
/// <exception cref="InvalidOperationException">Thrown when <see cref="Complete"/> has been called and this is a new top-level lock request.</exception>
public Awaitable UpgradeableReadLockAsync(CancellationToken cancellationToken = default(CancellationToken))
{
return new Awaitable(this, LockKind.UpgradeableRead, LockFlags.None, cancellationToken);
}

/// <summary>
/// Obtains a read lock, asynchronously awaiting for the lock if it is not immediately available.
/// Obtains an upgradeable read lock, asynchronously awaiting for the lock if it is not immediately available.
/// </summary>
/// <param name="options">Modifications to normal lock behavior.</param>
/// <param name="cancellationToken">
Expand All @@ -443,6 +445,7 @@ protected virtual bool IsUnsupportedSynchronizationContext
/// a canceled token will cause the code that is waiting for the lock to resume with an <see cref="OperationCanceledException"/>.
/// </param>
/// <returns>An awaitable object whose result is the lock releaser.</returns>
/// <exception cref="InvalidOperationException">Thrown when <see cref="Complete"/> has been called and this is a new top-level lock request.</exception>
public Awaitable UpgradeableReadLockAsync(LockFlags options, CancellationToken cancellationToken = default(CancellationToken))
{
return new Awaitable(this, LockKind.UpgradeableRead, options, cancellationToken);
Expand All @@ -457,6 +460,7 @@ protected virtual bool IsUnsupportedSynchronizationContext
/// a canceled token will cause the code that is waiting for the lock to resume with an <see cref="OperationCanceledException"/>.
/// </param>
/// <returns>An awaitable object whose result is the lock releaser.</returns>
/// <exception cref="InvalidOperationException">Thrown when <see cref="Complete"/> has been called and this is a new top-level lock request.</exception>
public Awaitable WriteLockAsync(CancellationToken cancellationToken = default(CancellationToken))
{
return new Awaitable(this, LockKind.Write, LockFlags.None, cancellationToken);
Expand All @@ -472,6 +476,7 @@ protected virtual bool IsUnsupportedSynchronizationContext
/// a canceled token will cause the code that is waiting for the lock to resume with an <see cref="OperationCanceledException"/>.
/// </param>
/// <returns>An awaitable object whose result is the lock releaser.</returns>
/// <exception cref="InvalidOperationException">Thrown when <see cref="Complete"/> has been called and this is a new top-level lock request.</exception>
public Awaitable WriteLockAsync(LockFlags options, CancellationToken cancellationToken = default(CancellationToken))
{
return new Awaitable(this, LockKind.Write, options, cancellationToken);
Expand Down