JayBeams
0.1
Another project to have fun coding.
|
Hold data to startup a thread in JayBeams. More...
#include <thread_setup_wrapper.hpp>
Public Member Functions | |
thread_setup_wrapper (jb::thread_config const &config, Callable &&c) | |
virtual void | operator() () |
Private Attributes | |
jb::thread_config | config_ |
std::shared_ptr< Callable > | callable_ |
Hold data to startup a thread in JayBeams.
We want to launch all threads using a common configuration function. To match the semantics of std::thread, we need to copy the thread functor and its parameters exactly once. This class wraps the relevant bits in a shared_ptr<> to avoid excessive copying.
Definition at line 22 of file thread_setup_wrapper.hpp.
|
inline |
Definition at line 24 of file thread_setup_wrapper.hpp.
|
inlinevirtual |
Definition at line 28 of file thread_setup_wrapper.hpp.
References jb::detail::thread_setup_wrapper< Callable >::config_, JB_LOG, jb::detail::reconfigure_this_thread(), and jb::warning.
|
private |
Definition at line 43 of file thread_setup_wrapper.hpp.
|
private |
Definition at line 42 of file thread_setup_wrapper.hpp.
Referenced by jb::detail::thread_setup_wrapper< Callable >::operator()().