Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::ThreadPoolCreateInfo Struct Reference

Thread pool create information. More...

#include <ThreadPool.hpp>

Public Attributes

size_t NumThreads = 0
 The number of worker threads to start.
 
std::function< void(Uint32)> OnThreadStarted = nullptr
 
std::function< void(Uint32)> OnThreadExiting = nullptr
 

Detailed Description

Thread pool create information.

Member Data Documentation

◆ NumThreads

size_t Diligent::ThreadPoolCreateInfo::NumThreads = 0

The number of worker threads to start.

An application may create a thread pool with zero threads, in which case it will be responsible for manually calling the IThreadPool::ProcessTask() method.

◆ OnThreadExiting

std::function<void(Uint32)> Diligent::ThreadPoolCreateInfo::OnThreadExiting = nullptr

An optional function that will be called by the thread pool from the worker thread before the worker thread exits.

◆ OnThreadStarted

std::function<void(Uint32)> Diligent::ThreadPoolCreateInfo::OnThreadStarted = nullptr

An optional function that will be called by the thread pool from the worker thread after the thread has just started, but before the first task is processed.