|
thread_supervisor
|
Thread supervisor.
Definition at line 338 of file supervisor.h.
#include <supervisor.h>
Public Member Functions | |
| Supervisor () | |
| ~Supervisor () | |
| void | interrupt () |
| Interrupt execution, see isInterrupted. More... | |
| bool | isInterrupted () const |
| Check if interrupted, child threads should stop when true (pass supervisor as a parameter). More... | |
| bool | stop (const std::size_t wait_ms=10000) |
| Interrupt and wait for children to stop. More... | |
| template<class... t_Args> | |
| void | add (t_Args &&...args) |
| Add a thread: (<thread parameters>, <function pointer>, <function parameters>) More... | |
Protected Member Functions | |
| bool | wait (const std::size_t wait_ms) |
| bool | empty () |
| void | drop (const std::list< Thread >::iterator &item) |
Private Attributes | |
| THREAD_SUPERVISOR_DISABLE_CLASS_COPY(Supervisor) protected std::mutex | threads_mutex_ |
| Thread::List | threads_ |
| std::mutex | terminated_threads_mutex_ |
| std::list< Thread::Reference > | terminated_threads_ |
Friends | |
| class | Thread |
|
inline |
Definition at line 416 of file supervisor.h.
|
inline |
Definition at line 422 of file supervisor.h.
|
inline |
Add a thread: (<thread parameters>, <function pointer>, <function parameters>)
Definition at line 469 of file supervisor.h.
|
inlineprotected |
Definition at line 405 of file supervisor.h.
|
inlineprotected |
Definition at line 398 of file supervisor.h.
|
inline |
Interrupt execution, see isInterrupted.
Definition at line 446 of file supervisor.h.
|
inline |
Check if interrupted, child threads should stop when true (pass supervisor as a parameter).
Definition at line 453 of file supervisor.h.
|
inline |
Interrupt and wait for children to stop.
Definition at line 460 of file supervisor.h.
|
inlineprotected |
Definition at line 355 of file supervisor.h.
|
friend |
Definition at line 340 of file supervisor.h.
|
private |
Definition at line 351 of file supervisor.h.
|
private |
Definition at line 350 of file supervisor.h.
|
private |
Definition at line 348 of file supervisor.h.
|
private |
Definition at line 347 of file supervisor.h.