The Vish Visualization Shell 0.3
Vish
Public Member Functions | List of all members
MemCore::ThreadPool Class Reference

A pool of threads, to be used in conjunction with async(). More...

#include <elementary/memcore/async.hpp>

Inheritance diagram for MemCore::ThreadPool:
Wizt::Seagrass

Public Member Functions

 ThreadPool (const std::string &ThreadPoolName, unsigned ThreadFactor=2)
 Construct with a set of threads relative to the number of nodes available on the current hardware.
 
 ThreadPool (size_t threads, const std::string &ThreadPoolName)
 Construct with a given number of threads.
 

Detailed Description

A pool of threads, to be used in conjunction with async().

Constructor & Destructor Documentation

◆ ThreadPool()

MemCore::ThreadPool::ThreadPool ( const std::string &  ThreadPoolName,
unsigned  ThreadFactor = 2 
)

Construct with a set of threads relative to the number of nodes available on the current hardware.

Parameters
ThreadFactorFactor by how many more threads than nodes shall be used. Effective number of threads will be
1+ThreadFactor*std::thread::hardware_concurrency()