Foundation
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Foundation::Core::ThreadPoolLambdaJob< Lambda, ReturnType, Args > Struct Template Referencefinal

State-carrying lambda job for use with ThreadPool. More...

#include <ThreadPool.hpp>

Inheritance diagram for Foundation::Core::ThreadPoolLambdaJob< Lambda, ReturnType, Args >:
Foundation::Core::ThreadPoolJob

Public Member Functions

 ThreadPoolLambdaJob (Lambda &&func)
 
void Execute (size_t) noexcept override
 
- Public Member Functions inherited from Foundation::Core::ThreadPoolJob
virtual ~ThreadPoolJob ()=default
 

Public Attributes

Lambda mFunc
 
Promise< ReturnTypemPromise
 

Detailed Description

template<typename Lambda, typename ReturnType, typename... Args>
struct Foundation::Core::ThreadPoolLambdaJob< Lambda, ReturnType, Args >

State-carrying lambda job for use with ThreadPool.

Note
This is not meant to be used directly. Instead, use ThreadPool::Push with a lambda function.
Template Parameters
LambdaType of the lambda function.
ReturnTypeReturn type of the lambda function.

Constructor & Destructor Documentation

◆ ThreadPoolLambdaJob()

template<typename Lambda , typename ReturnType , typename... Args>
Foundation::Core::ThreadPoolLambdaJob< Lambda, ReturnType, Args >::ThreadPoolLambdaJob ( Lambda &&  func)
inline

Member Function Documentation

◆ Execute()

template<typename Lambda , typename ReturnType , typename... Args>
void Foundation::Core::ThreadPoolLambdaJob< Lambda, ReturnType, Args >::Execute ( size_t  )
inlineoverridevirtualnoexcept

Member Data Documentation

◆ mFunc

◆ mPromise


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