39#include <snapdev/poison.h>
92 throw logic_error(
"life pointer is nullptr");
99 throw not_started(
"somehow the thread was not started, an error should have been logged");
life(thread *const thread)
Initialize a "thread life" object.
thread * f_thread
The pointer to the thread being managed.
~life()
Make sure the thread stops.
A thread object that ensures proper usage of system threads.
void stop(std::function< void(thread *)> callback=nullptr)
Stop the thread.
bool start()
Attempt to start the thread.
Exceptions for the thread environment.
Thread Runner and Managers.
Thread Runner and Managers.