|
scc
2024.06
SystemC components library
|
executes a function syncronized in another thread More...
#include <thread_syncronizer.h>
Public Member Functions | |
| thread_syncronizer ()=default | |
| ~thread_syncronizer () | |
| bool | is_ready () |
| template<class F , class... Args> | |
| std::result_of< F(Args...)>::type | enqueue_and_wait (F &&f, Args &&... args) |
| template<class F , class... Args> | |
| auto | enqueue (F &&f, Args &&... args) -> std::future< typename std::result_of< F(Args...)>::type > |
| void | execute () |
| void | executeNext () |
executes a function syncronized in another thread
Definition at line 34 of file thread_syncronizer.h.
|
default |
the constructor.
|
inline |
the destructor
Definition at line 49 of file thread_syncronizer.h.
|
inline |
enqueue a function to be executed in the other thread
| f | the functor to execute |
| args | the arguments to pass to the functor |
Definition at line 78 of file thread_syncronizer.h.
|
inline |
enqueue a function to be executed in the other thread and wait for completion
| f | the functor to execute |
| args | the arguments to pass to the functor |
Definition at line 66 of file thread_syncronizer.h.
|
inline |
execute the next task in queue but do not wait for the next one
Definition at line 93 of file thread_syncronizer.h.
|
inline |
execute the next task in queue or wait for the next one
Definition at line 115 of file thread_syncronizer.h.
|
inline |
check if the synchronizer can handle functions
Definition at line 58 of file thread_syncronizer.h.