Pothos  0.4.1-gb758ed46
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

Pothos::ThreadPool::ThreadPool ( void  )

Create a null ThreadPool.

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

Create a ThreadPool from an opaque shared_ptr.

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

Create a new ThreadPool from args.

Parameters
argsthe configuration struct
Exceptions
ThreadPoolErroron bad values

Member Function Documentation

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
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: