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

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

#include <ThreadPool.hpp>

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

Public Member Functions

 ThreadPoolLambdaJob (SharedPromise< ReturnType > promise, Lambda &&func)
 
void Execute (size_t) noexcept override
 
- Public Member Functions inherited from Foundation::Async::ThreadPoolJob
virtual ~ThreadPoolJob ()=default
 

Private Attributes

Lambda mFunc
 
SharedPromise< ReturnTypemPromise
 

Detailed Description

template<typename Lambda, typename ReturnType>
class Foundation::Async::ThreadPoolLambdaJob< Lambda, ReturnType >

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()

Foundation::Async::ThreadPoolLambdaJob< Lambda, ReturnType >::ThreadPoolLambdaJob ( SharedPromise< ReturnType promise,
Lambda &&  func 
)
inline

Member Function Documentation

◆ Execute()

void Foundation::Async::ThreadPoolLambdaJob< Lambda, ReturnType >::Execute ( size_t  )
inlineoverridevirtualnoexcept

Member Data Documentation

◆ mFunc

◆ mPromise


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