Class returned by runInThread.
More...
#include <lambda.h>
|
| std::unique_ptr< LambdaThread > | runInThread (const std::function< void()> &fn, const std::string &thread_name="") |
| | Run a lambda in a separate thread.
|
Class returned by runInThread.
Provides the usual thread methods along with rethrow().
◆ LambdaThread()
| LambdaThread::LambdaThread |
( |
const std::string & | name = "" | ) |
|
|
inlineprivate |
◆ rethrow()
| void LambdaThread::rethrow |
( |
| ) |
|
|
inline |
◆ run()
| void * LambdaThread::run |
( |
| ) |
|
|
inlineprivatevirtual |
◆ start()
◆ runInThread
| std::unique_ptr< LambdaThread > runInThread |
( |
const std::function< void()> & | fn, |
|
|
const std::string & | thread_name = "" ) |
|
friend |
Run a lambda in a separate thread.
Exceptions will be caught.
- Parameters
-
| fn | function to run |
| thread_name | name for thread |
- Returns
- thread object of type LambdaThread
References LambdaThread().
◆ m_exptr
| std::exception_ptr LambdaThread::m_exptr |
|
private |
◆ m_fn
| std::function<void()> LambdaThread::m_fn |
|
private |
The documentation for this class was generated from the following file: