SObjectizer  5.5
Classes | Public Member Functions | Public Attributes | List of all members
timertt::details::thread_mixin Struct Reference

A mixin which must be used as base class for timer threads. More...

#include <all.hpp>

Classes

class  lock_guard
 A special wrapper around actual std::unique_lock. More...
 

Public Member Functions

void ensure_started ()
 Checks that timer thread is really started. More...
 
void notify ()
 Sends notification to timer thread. More...
 

Public Attributes

std::mutex m_lock
 Timer thread's lock. More...
 
std::condition_variable m_condition
 Condition variable for waiting for next event. More...
 
std::shared_ptr< std::thread > m_thread
 Underlying thread object. More...
 

Detailed Description

A mixin which must be used as base class for timer threads.

Since
v.1.1.0

Member Function Documentation

◆ ensure_started()

void timertt::details::thread_mixin::ensure_started ( )
inline

Checks that timer thread is really started.

Exceptions
std::exceptionif thread is not started.

◆ notify()

void timertt::details::thread_mixin::notify ( )
inline

Sends notification to timer thread.

Member Data Documentation

◆ m_condition

std::condition_variable timertt::details::thread_mixin::m_condition

Condition variable for waiting for next event.

◆ m_lock

std::mutex timertt::details::thread_mixin::m_lock

Timer thread's lock.

◆ m_thread

std::shared_ptr< std::thread > timertt::details::thread_mixin::m_thread

Underlying thread object.

Note
Will be created during timer thread start and destroyed after timer thread shutdown.

The documentation for this struct was generated from the following file: