Ring Daemon 16.0.0
Loading...
Searching...
No Matches
jami::InterruptedThreadLoop Class Reference

#include <threadloop.h>

Inheritance diagram for jami::InterruptedThreadLoop:
Inheritance graph
Collaboration diagram for jami::InterruptedThreadLoop:
Collaboration graph

Public Member Functions

void interrupt () noexcept
 
 InterruptedThreadLoop (const std::function< bool()> &setup, const std::function< void()> &process, const std::function< void()> &cleanup)
 
void stop () override
 
template<typename Pred >
void wait (Pred &&pred)
 
template<typename Rep , typename Period >
void wait_for (const std::chrono::duration< Rep, Period > &rel_time)
 
template<typename Rep , typename Period , typename Pred >
bool wait_for (const std::chrono::duration< Rep, Period > &rel_time, Pred &&pred)
 
- Public Member Functions inherited from jami::ThreadLoop
void exit ()
 
std::thread::id get_id () const noexcept
 
bool isRunning () const noexcept
 
bool isStopping () const noexcept
 
void join ()
 
void start ()
 
 ThreadLoop (const std::function< bool()> &setup, const std::function< void()> &process, const std::function< void()> &cleanup)
 
void waitForCompletion ()
 
virtual ~ThreadLoop ()
 

Additional Inherited Members

- Public Types inherited from jami::ThreadLoop
enum class  ThreadState { READY , RUNNING , STOPPING }
 

Detailed Description

Definition at line 76 of file threadloop.h.

Constructor & Destructor Documentation

◆ InterruptedThreadLoop()

jami::InterruptedThreadLoop::InterruptedThreadLoop ( const std::function< bool()> &  setup,
const std::function< void()> &  process,
const std::function< void()> &  cleanup 
)
inline

Definition at line 79 of file threadloop.h.

Member Function Documentation

◆ interrupt()

void jami::InterruptedThreadLoop::interrupt ( )
inlinenoexcept

Definition at line 87 of file threadloop.h.

◆ stop()

void jami::InterruptedThreadLoop::stop ( )
overridevirtual

Reimplemented from jami::ThreadLoop.

Definition at line 126 of file threadloop.cpp.

References jami::ThreadLoop::stop().

Here is the call graph for this function:

◆ wait()

template<typename Pred >
void jami::InterruptedThreadLoop::wait ( Pred &&  pred)
inline

Definition at line 110 of file threadloop.h.

References jami::emitSignal(), jami::ThreadLoop::get_id(), and jami::ThreadLoop::isStopping().

Here is the call graph for this function:

◆ wait_for() [1/2]

template<typename Rep , typename Period >
void jami::InterruptedThreadLoop::wait_for ( const std::chrono::duration< Rep, Period > &  rel_time)
inline

Definition at line 90 of file threadloop.h.

References jami::emitSignal(), jami::ThreadLoop::get_id(), and jami::ThreadLoop::isStopping().

Here is the call graph for this function:

◆ wait_for() [2/2]

bool jami::InterruptedThreadLoop::wait_for ( const std::chrono::duration< Rep, Period > &  rel_time,
Pred &&  pred 
)
inline

Definition at line 100 of file threadloop.h.

References jami::emitSignal(), jami::ThreadLoop::get_id(), and jami::ThreadLoop::isStopping().

Here is the call graph for this function:

The documentation for this class was generated from the following files: