Share via


AsyncReaderWriterLock.GetTaskSchedulerForReadLockRequest Method

Definition

Get the task scheduler to execute the continuation when the lock is acquired. AsyncReaderWriterLock uses a special SynchronizationContext to handle exclusive locks, and will ignore task scheduler provided, so this is only used in a read lock scenario. This method is called within the execution context to wait the read lock, so it can pick up TaskScheduler based on the current execution context. Note: the task scheduler is only used, when the lock is issued later. If the lock is issued immediately when CanCurrentThreadHoldActiveLock returns true, it will be ignored.

protected:
 virtual System::Threading::Tasks::TaskScheduler ^ GetTaskSchedulerForReadLockRequest();
protected virtual System.Threading.Tasks.TaskScheduler GetTaskSchedulerForReadLockRequest ();
abstract member GetTaskSchedulerForReadLockRequest : unit -> System.Threading.Tasks.TaskScheduler
override this.GetTaskSchedulerForReadLockRequest : unit -> System.Threading.Tasks.TaskScheduler
Protected Overridable Function GetTaskSchedulerForReadLockRequest () As TaskScheduler

Returns

A task scheduler to schedule the continuation task when a lock is issued.

Applies to