threadman 0.1.0
Header-only C++23 managed threads, dynamic pools, futures, and executors
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
threadman::SingleThreadExecutor Class Referencefinal

#include <thread_pool.hpp>

Inheritance diagram for threadman::SingleThreadExecutor:
Inheritance graph
[legend]
Collaboration diagram for threadman::SingleThreadExecutor:
Collaboration graph
[legend]

Public Member Functions

 SingleThreadExecutor (std::string nm="tm::single")
 
void execute (std::function< void()> task) override
 
std::string_view name () const noexcept override
 
template<class Fn >
requires std::invocable<Fn>
auto submit (Fn &&f) -> Future< std::invoke_result_t< Fn > >
 
ThreadPoolpool () const noexcept
 
- Public Member Functions inherited from threadman::IExecutor
virtual ~IExecutor ()=default
 

Static Public Member Functions

static const comms::DisplayInfo & display_info ()
 

Constructor & Destructor Documentation

◆ SingleThreadExecutor()

threadman::SingleThreadExecutor::SingleThreadExecutor ( std::string  nm = "tm::single")
inlineexplicit

Member Function Documentation

◆ display_info()

static const comms::DisplayInfo & threadman::SingleThreadExecutor::display_info ( )
inlinestatic

◆ execute()

void threadman::SingleThreadExecutor::execute ( std::function< void()>  task)
inlineoverridevirtual

Implements threadman::IExecutor.

◆ name()

std::string_view threadman::SingleThreadExecutor::name ( ) const
inlineoverridevirtualnoexcept

Implements threadman::IExecutor.

◆ pool()

ThreadPool & threadman::SingleThreadExecutor::pool ( ) const
inlinenoexcept

◆ submit()

template<class Fn >
requires std::invocable<Fn>
auto threadman::SingleThreadExecutor::submit ( Fn &&  f) -> Future<std::invoke_result_t<Fn>>
inline

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