Class returned by runInThread.
More...
#include <lambda.h>
Inheritance diagram for LambdaThread:
Collaboration diagram for LambdaThread:Public Member Functions | |
| void | rethrow () |
| Re-throw a caught exception, if any. Can only be called after thread exit. | |
Public Member Functions inherited from Thread | |
| Thread (const std::string &name="") | |
| virtual | ~Thread () |
| bool | start () |
| bool | stop () |
| bool | wait () |
| bool | isCurrentThread () |
| bool | isRunning () |
| bool | stopRequested () |
| std::thread::id | getThreadId () |
| bool | getReturnValue (void **ret) |
| bool | bindToProcessor (unsigned int proc_number) |
| bool | setPriority (int prio) |
Private Member Functions | |
| LambdaThread (const std::string &name="") | |
| void * | run () |
| bool | start () |
Private Attributes | |
| std::function< void()> | m_fn |
| std::exception_ptr | m_exptr |
Friends | |
| std::unique_ptr< LambdaThread > | runInThread (const std::function< void()> &fn, const std::string &thread_name="") |
| Run a lambda in a separate thread. | |
Additional Inherited Members | |
Static Public Member Functions inherited from Thread | |
| static Thread * | getCurrentThread () |
| static void | setName (const std::string &name) |
| static unsigned int | getNumberOfProcessors () |
Protected Attributes inherited from Thread | |
| std::string | m_name |
Class returned by runInThread.
Provides the usual thread methods along with rethrow().
|
inlineprivate |
|
inline |
Re-throw a caught exception, if any. Can only be called after thread exit.
References Thread::isRunning(), m_exptr, and sanity_check.
Here is the call graph for this function:
|
private |
|
friend |
Run a lambda in a separate thread.
Exceptions will be caught.
| fn | function to run |
| thread_name | name for thread |
LambdaThread
|
private |
Referenced by run().