Pothos  0.7.0-gf7fbae99
The Pothos dataflow programming software suite
Public Member Functions | List of all members
Pothos::ThreadPool Class Reference

#include <ThreadPool.hpp>

Public Member Functions

 ThreadPool (void)
 Create a null ThreadPool. More...
 
 ThreadPool (const std::shared_ptr< void > &)
 Create a ThreadPool from an opaque shared_ptr. More...
 
 ThreadPool (const ThreadPoolArgs &args)
 
 operator bool (void) const
 
const std::shared_ptr< void > & getContainer (void) const
 

Detailed Description

A ThreadPool manages a group of threads that perform work in a Topology. Not only can users configure the number of threads, but there are a variety of other settings such as affinity, real-time priority, and internal threading mechanisms.

The thread pool can operate in two major modes:

Constructor & Destructor Documentation

◆ ThreadPool() [1/3]

Pothos::ThreadPool::ThreadPool ( void  )

Create a null ThreadPool.

◆ ThreadPool() [2/3]

Pothos::ThreadPool::ThreadPool ( const std::shared_ptr< void > &  )

Create a ThreadPool from an opaque shared_ptr.

◆ ThreadPool() [3/3]

Pothos::ThreadPool::ThreadPool ( const ThreadPoolArgs args)

Create a new ThreadPool from args.

Parameters
argsthe configuration struct
Exceptions
ThreadPoolErroron bad values

Member Function Documentation

◆ getContainer()

const std::shared_ptr<void>& Pothos::ThreadPool::getContainer ( void  ) const

Get access to the underlying container for the thread pool.

Returns
an opaque shared_ptr to the internal object

◆ operator bool()

Pothos::ThreadPool::operator bool ( void  ) const
explicit

Is this thread pool valid/non-empty?

Returns
true when the thread poll is non-null

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