Beef Corlib
|
Public Member Functions | |
ThreadPoolTaskScheduler () | |
Constructs a new ThreadPool task scheduler object. | |
Protected Member Functions | |
override void | QueueTask (Task task) |
Schedules a task to the ThreadPool. More... | |
override bool | TryExecuteTaskInline (Task task, bool taskWasPreviouslyQueued) |
This internal function will do this: (1) If the task had previously been queued, attempt to pop it and return false if that fails. More... | |
override bool | TryDequeue (Task task) |
override void | NotifyWorkItemProgress () |
Notifies the scheduler that work is progressing (no-op). | |
![]() | |
bool | TryRunInline (Task task, bool taskWasPreviouslyQueued) |
void | InternalQueueTask (Task task) |
Properties | |
override bool | RequiresAtomicStartTransition [get] |
This is the only scheduler that returns false for this property, indicating that the task entry codepath is unsafe (CAS free) since we know that the underlying scheduler already takes care of atomic transitions from queued to non-queued. | |
![]() | |
static TaskScheduler | Default [get] |
static TaskScheduler?? | Current [get] |
static TaskScheduler? | InternalCurrent [get] |
virtual bool | RequiresAtomicStartTransition [get] |
|
inlineprotectedvirtual |
Schedules a task to the ThreadPool.
task | The task to schedule. |
Implements System.Threading.Tasks.TaskScheduler.
|
inlineprotectedvirtual |
This internal function will do this: (1) If the task had previously been queued, attempt to pop it and return false if that fails.
(2) Propagate the return value from Task.ExecuteEntry() back to the caller.
IMPORTANT NOTE: TryExecuteTaskInline will NOT throw task exceptions itself. Any wait code path using this function needs to account for exceptions that need to be propagated, and throw themselves accordingly.
Implements System.Threading.Tasks.TaskScheduler.