nndeploy C++ API  0.2.0
nndeploy C++ API
Public Member Functions | List of all members
nndeploy::thread_pool::ThreadPool Class Reference

#include <thread_pool.h>

Public Member Functions

template<typename FunctionType >
auto commit (const FunctionType &func) -> std::future< decltype(std::declval< FunctionType >()())>
 
template<typename F >
auto commit_to (int slot, F &&f) -> std::future< std::invoke_result_t< F >>
 
base::Status destroy ()
 
base::Status init ()
 
 ThreadPool (int size=4)
 

Detailed Description

Definition at line 16 of file thread_pool.h.

Constructor & Destructor Documentation

◆ ThreadPool()

nndeploy::thread_pool::ThreadPool::ThreadPool ( int  size = 4)
inlineexplicit

Definition at line 18 of file thread_pool.h.

Member Function Documentation

◆ commit()

template<typename FunctionType >
auto nndeploy::thread_pool::ThreadPool::commit ( const FunctionType &  func) -> std::future<decltype(std::declval<FunctionType>()())>
inline

Definition at line 52 of file thread_pool.h.

◆ commit_to()

template<typename F >
auto nndeploy::thread_pool::ThreadPool::commit_to ( int  slot,
F &&  f 
) -> std::future<std::invoke_result_t<F>>
inline

Definition at line 67 of file thread_pool.h.

◆ destroy()

base::Status nndeploy::thread_pool::ThreadPool::destroy ( )
inline

Definition at line 34 of file thread_pool.h.

◆ init()

base::Status nndeploy::thread_pool::ThreadPool::init ( )
inline

Definition at line 20 of file thread_pool.h.


The documentation for this class was generated from the following file: