C# Класс BitSharper.Threading.Execution.ThreadPoolExecutor.Worker

Class Worker mainly maintains interrupt control state for threads running tasks, along with other minor bookkeeping. This class opportunistically extends ReentrantLock to simplify acquiring and releasing a lock surrounding each task execution. This protects against interrupts that are intended to wake up a worker thread waiting for a task from instead interrupting a task being run.
Наследование: BitSharper.Threading.Locks.ReentrantLock, IRunnable
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
CompletedTasks uint
FirstTask IRunnable
Thread Thread

Открытые методы

Метод Описание
Run ( ) : void

Runs the associated task, signalling the ThreadPoolExecutor when exiting.

Приватные методы

Метод Описание
Worker ( ThreadPoolExecutor parentThreadPoolExecutor, IRunnable firstTask ) : System

Default Constructor

Описание методов

Run() публичный Метод

Runs the associated task, signalling the ThreadPoolExecutor when exiting.
public Run ( ) : void
Результат void

Описание свойств

CompletedTasks защищенное свойство

Per thread completed task counter; accumulated into completedTaskCount upon termination.
protected uint CompletedTasks
Результат uint

FirstTask защищенное свойство

Initial task to run before entering run loop
protected IRunnable FirstTask
Результат IRunnable

Thread защищенное свойство

Thread this worker is running in. Acts as a final field, but cannot be set until thread is created.
protected Thread Thread
Результат Thread