1 #ifndef jb_launch_thread_hpp 2 #define jb_launch_thread_hpp 14 template <
typename Function,
typename... A>
16 std::thread& t,
thread_config const& config, Function&& f, A&&... a) {
18 config, std::bind(std::forward<Function>(f), std::forward<A>(a)...));
26 #endif // jb_launch_thread_hpp Hold the configuration to initialize threads.
void launch_thread(std::thread &t, thread_config const &config, Function &&f, A &&... a)
Create a new thread, configure it as desired, and then call a user-defined function.
The top-level namespace for the JayBeams library.
thread_setup_wrapper< Callable > make_thread_setup_wrapper(thread_config const &config, Callable &&c)
Create the right type of thread_setup_wrapper<>.