class TThreadPool

template<class ThreadPolicy = ThreadNoPolicy>
Inherits: ThreadPool

Class that maintains a pool of threads we can easily retrieve and use for any task.

This saves on the cost of creating and destroying threads.

Template parameters

ThreadPolicy

Allows you specify a policy with methods that will get called whenever a new thread is created or when a thread is destroyed.

Public

Constructors

TThreadPool<ThreadPolicy>

TThreadPool<ThreadPolicy>(u32 threadCapacity, u32 idleTimeout = 60)

Protected

Methods

CreateThread

SPtr<PooledThread> CreateThread(const String &name) override

Creates a new thread to be used by the pool.