Cbeam
|
Base class for creating and managing a thread. This class follows the Curiously Recurring Template Pattern (CRTP) to allow derived classes to implement their specific worker logic.
Base class for creating and managing a thread. This class follows the Curiously Recurring Template Pattern (CRTP) to allow derived classes to implement their specific worker logic. The first argument of the inherited class’ constructor needs to be the private threaded_object::construction_token to prevent construction without threaded_object::create.
See https://en.cppreference.com/w/cpp/thread/condition_variable The method worker
needs to be public to enable creation via static method threaded_object::create().
Derived | The derived class which implements the worker method. |