TTaskExecutionThreadPool
A pool of
TTaskExecutionThread
instances that can execute a TScheduledTask
.
Inheritance
Level | Ancestor | Description |
---|---|---|
1 | TObject | Ultimate ancestor in a class hierarchy |
2 | TTaskExecutionThreadPool |
Source
Task.Execution.Thread.Pool.pas (30)
Description
A pool is initialized without any threads. Whenenever a task is executed and the current number of threads is lower than the lower bound, a new thread will be added to the pool. A newly arriving task will be added to a queue and tasks in the queue will be removed by the threads in the pool that are idle. Whenever all threads are busy and new task is queued a new thread will be added to the pool. No more threads than the maximum specified will be created.
Fields
Scope | Visibility | Type | Name | Description |
---|---|---|---|---|
Instance | private | TWaitableQueue<TEvent> | FStatusQueue | |
Instance | private | TWaitableQueue<TScheduledTask> | Queue | |
Instance | private | TInteger32Interval | ConcurrencyRange | |
Instance | private | TList<TTaskExecutionThread> | Threads |
Methods
Scope | Visibility | Result | Name | Description |
---|---|---|---|---|
Instance | private | SetStatusQueue(Value: TWaitableQueue<TEvent>) | ||
Instance | private | TTaskExecutionThread | CreateThread() | |
Instance | public | Create(ConcurrencyRange: TInteger32Interval; MaximumQueueSize: TInteger32) | ||
Instance | public | Destroy() | ||
Instance | public | Execute(Task: TScheduledTask) |