Pothos  0.2.1-g9f04573d
The Pothos dataflow programming software suite
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros
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)
 
pothos_explicit 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_explicit Pothos::ThreadPool::operator bool ( void  ) const

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: