class
PooledThread
Wrapper around a thread that is used within ThreadPool.
Public
Constructors
PooledThread
Methods
~PooledThread
Initialize
Initializes the pooled thread.
Must be called right after construction.
Start
Starts executing the given worker method.
Destroy
Attempts to join the currently running thread and destroys it.
Caller must ensure that any worker method currently running properly returns, otherwise this will block indefinitely.
IsIdle
Returns true if the thread is idle and new worker method can be scheduled on it.
IdleTime
Returns how long has the thread been idle.
Value is undefined if thread is not idle.
SetName
Sets a name of the thread.
BlockUntilComplete
Blocks the current thread until this thread completes.
Returns immediately if the thread is idle.
OnThreadStarted
Called when the thread is first created.
OnThreadEnded
Called when the thread is being shut down.
Protected
Methods
Run
Primary worker method that is ran when the thread is first initialized.