|
scc 2026.07
SystemC components library
|
executes a function syncronized in another thread More...
#include <thread_syncronizer.h>
Public Member Functions | |
| thread_syncronizer (size_t queue_capacity=default_queue_capacity) | |
| ~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 36 of file thread_syncronizer.h.
|
inlineexplicit |
the constructor.
Definition at line 50 of file thread_syncronizer.h.
|
inline |
the destructor
Definition at line 55 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 92 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 75 of file thread_syncronizer.h.
|
inline |
execute the next task in queue but do not wait for the next one
Definition at line 109 of file thread_syncronizer.h.
|
inline |
execute the next task in queue or wait for the next one
Definition at line 124 of file thread_syncronizer.h.
|
inline |
check if the synchronizer can handle functions
Definition at line 64 of file thread_syncronizer.h.