ZLayout EDA Library v1.0.0
Advanced Electronic Design Automation Layout Library with Bilingual Documentation
Loading...
Searching...
No Matches
zlayout::spatial::ThreadPool Class Reference

Thread pool for parallel processing. More...

#include <advanced_spatial.hpp>

Public Member Functions

 ThreadPool (size_t threads=std::thread::hardware_concurrency())
 ~ThreadPool ()
template<class F, class... Args>
auto enqueue (F &&f, Args &&... args) const -> std::future< typename std::result_of< F(Args...)>::type >
void wait_for_completion ()
size_t get_thread_count () const

Detailed Description

Thread pool for parallel processing.

Definition at line 108 of file advanced_spatial.hpp.

Constructor & Destructor Documentation

◆ ThreadPool()

zlayout::spatial::ThreadPool::ThreadPool ( size_t threads = std::thread::hardware_concurrency())
explicit

Definition at line 16 of file advanced_spatial.cpp.

◆ ~ThreadPool()

zlayout::spatial::ThreadPool::~ThreadPool ( )

Definition at line 36 of file advanced_spatial.cpp.

Member Function Documentation

◆ enqueue()

template<class F, class... Args>
auto zlayout::spatial::ThreadPool::enqueue ( F && f,
Args &&... args ) const -> std::future<typename std::result_of<F(Args...)>::type>

Definition at line 48 of file advanced_spatial.cpp.

◆ get_thread_count()

size_t zlayout::spatial::ThreadPool::get_thread_count ( ) const
inline

Definition at line 125 of file advanced_spatial.hpp.

◆ wait_for_completion()

void zlayout::spatial::ThreadPool::wait_for_completion ( )

Definition at line 69 of file advanced_spatial.cpp.


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