Partager via


AsyncReaderWriterResourceLock<TMoniker,TResource>.PrepareResourceForConcurrentAccessAsync Method

Definition

Prepares a resource for concurrent access.

protected:
 abstract System::Threading::Tasks::Task ^ PrepareResourceForConcurrentAccessAsync(TResource resource, System::Threading::CancellationToken cancellationToken);
protected abstract System.Threading.Tasks.Task PrepareResourceForConcurrentAccessAsync (TResource resource, System.Threading.CancellationToken cancellationToken);
abstract member PrepareResourceForConcurrentAccessAsync : 'Resource * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Protected MustOverride Function PrepareResourceForConcurrentAccessAsync (resource As TResource, cancellationToken As CancellationToken) As Task

Parameters

resource
TResource

The resource to prepare.

cancellationToken
CancellationToken

The token whose cancellation signals lost interest in the resource.

Returns

A task whose completion signals the resource has been prepared.

Remarks

This is invoked on a resource when it is initially requested for concurrent access, for both transitions from no access and exclusive access.

Applies to