Torque 3D 3.7
|
The following tables list the members exposed by SFXThreadPool.
|
Name |
Description |
![]() |
A ThreadPool context defines a logical context in which WorkItems are being executed. Their primary use is for biasing priorities of WorkItems. Contexts are arranged in a tree hierarchy. Each parent node's priority bias scales all the priority biases underneath it. Note that instances of this class are meant to be instantiated globally only. | |
![]() |
|
Name |
Description |
![]() ![]() |
Name of this pool. Mainly for debugging. Used to name worker threads. | |
![]() ![]() |
Number of worker threads spawned by the pool. | |
![]() ![]() |
Number of worker threads in non-sleeping state. | |
![]() ![]() |
Number of worker threads guaranteed to be non-blocking. | |
![]() ![]() | ||
![]() ![]() |
List of worker threads. | |
![]() ![]() |
Threaded priority queue for concurrent access by worker threads. | |
![]() ![]() | ||
![]() ![]() | ||
![]() ![]() |
|
Name |
Description |
|
Name |
Description |
![]() | ||
![]() |
Destroy the singleton instance. @note Asserts when no singleton has been constructed. | |
![]() |
For the global pool, it is very important to only ever call this function on the main thread and to let work items only ever come from the main thread. Otherwise this function has the potential of dead-locking as new work items may constantly be fed to the queue without it ever getting empty. @param timeOut Soft limit on the number of milliseconds to wait for the queue to flush out. -1 = infinite. | |
![]() |
| |
![]() |
| |
![]() |
Return the priority increment applied to work items on each passing of the update interval. | |
![]() |
Return the interval in which item priorities are updated on the queue. @return update interval in milliseconds. | |
![]() |
For ManagedSingleton. | |
![]() |
Return the global thread pool singleton. | |
![]() |
Return the singleton instance. @note Asserts when called before createSingleton(). | |
![]() | ||
![]() |
Process work items waiting on the main thread's work queue. There is a soft limit imposed on the time this method is allowed to run so as to balance frame-to-frame load. However, work items, once their processing is initiated, will not be suspended and will run for as long as they take to complete, so make sure individual items perform as little work as necessary. @see ThreadPool::getMainThreadThesholdTimeMS | |
![]() |
| |
![]() |
Add a work item to the main thread's work queue. The main thread's work queue will be processed each frame using a set timeout to limit the work being done. Nonetheless, work items will not be suspended in-midst of processing, so make sure that whatever work you issue to the main thread is light work or you may see short hangs in gameplay. To reiterate this: any code executed through this interface directly adds to frame processing time on the main thread. This method *may* (and is meant to) be called from threads other than the main thread. | |
![]() | ||
![]() | ||
![]() |
Create a ThreadPool called "SFX" with two threads. | |
![]() |
Manually shutdown threads outside of static destructors. |
Name |
Description |
This is nested type SFXInternal::SFXThreadPool::Parent. | |
This is nested type ThreadPool::QueueType. | |
This is nested type ThreadPool::WorkItemPtr. |
Copyright (c) 2015. All rights reserved.
|
What do you think about this topic? Send feedback!
|