Wrapper for a callable, it will count the number of registered Runnable instances and will register the thread executing the callable with the PFS and the Server threading infrastructure.
More...
#include <os0thread-create.h>
|
| void | init () |
| | Initializes the m_shared_future, uses the m_promise's get_future, which cannot be used since then, according to its documentation. More...
|
| |
| void | preamble () |
| | Register the thread with the server. More...
|
| |
| void | epilogue () |
| | Deregister the thread. More...
|
| |
|
| IB_thread | m_thread |
| | Future object which keeps the ref counter >= 1 at least as long as the Detached_thread is not-destroyed. More...
|
| |
| std::promise< void > | m_promise |
| | Promise which is set when task is done. More...
|
| |
Wrapper for a callable, it will count the number of registered Runnable instances and will register the thread executing the callable with the PFS and the Server threading infrastructure.
◆ Detached_thread()
Constructor for the detached thread.
- Parameters
-
| [in] | pfs_key | Performance schema key |
| [in] | pfs_seqnum | Performance schema sequence number |
◆ epilogue()
| void Detached_thread::epilogue |
( |
| ) |
|
|
inlineprivate |
◆ init()
| void Detached_thread::init |
( |
void |
| ) |
|
|
inlineprivate |
Initializes the m_shared_future, uses the m_promise's get_future, which cannot be used since then, according to its documentation.
◆ operator()()
template<typename F , typename... Args>
| void Detached_thread::operator() |
( |
F && |
f, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
Method to execute the callable.
- Parameters
-
| [in] | f | Callable object |
| [in] | args | Variable number of args to F |
◆ preamble()
| void Detached_thread::preamble |
( |
| ) |
|
|
inlineprivate |
Register the thread with the server.
◆ thread()
◆ m_promise
| std::promise<void> Detached_thread::m_promise |
|
private |
Promise which is set when task is done.
◆ m_thread
Future object which keeps the ref counter >= 1 at least as long as the Detached_thread is not-destroyed.
The documentation for this class was generated from the following file: