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

Wraps any Executor-conforming type behind the virtual IExecutor interface, so functions that take IExecutor& accept it. More...

#include <executor.hpp>

Inheritance diagram for threadman::ExecutorRef< Exec >:
Inheritance graph
[legend]
Collaboration diagram for threadman::ExecutorRef< Exec >:
Collaboration graph
[legend]

Public Member Functions

 ExecutorRef (Exec &e, std::string nm={}) noexcept
 
void execute (std::function< void()> task) override
 
std::string_view name () const noexcept override
 
- Public Member Functions inherited from threadman::IExecutor
virtual ~IExecutor ()=default
 

Detailed Description

template<class Exec>
requires Executor<Exec>
class threadman::ExecutorRef< Exec >

Wraps any Executor-conforming type behind the virtual IExecutor interface, so functions that take IExecutor& accept it.

Constructor & Destructor Documentation

◆ ExecutorRef()

template<class Exec >
threadman::ExecutorRef< Exec >::ExecutorRef ( Exec &  e,
std::string  nm = {} 
)
inlineexplicitnoexcept

Member Function Documentation

◆ execute()

template<class Exec >
void threadman::ExecutorRef< Exec >::execute ( std::function< void()>  task)
inlineoverridevirtual

Implements threadman::IExecutor.

◆ name()

template<class Exec >
std::string_view threadman::ExecutorRef< Exec >::name ( ) const
inlineoverridevirtualnoexcept

Implements threadman::IExecutor.


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