|
scc 2025.09
SystemC components library
|
A thread pool for executing tasks concurrently. More...
#include <sc_thread_pool.h>


Public Member Functions | |
| sc_thread_pool () | |
| Constructor for the sc_thread_pool class. | |
| virtual | ~sc_thread_pool () |
| Destructor for the sc_thread_pool class. | |
| void | execute (std::function< void(void)> fct) |
| Execute the given function in a separate SC_THREAD. | |
Public Attributes | |
| cci::cci_param< unsigned > | max_concurrent_threads {"max_concurrent_threads", 16} |
| The maximum number of concurrent threads in the thread pool. | |
A thread pool for executing tasks concurrently.
The sc_thread_pool class provides a mechanism for executing SystemC tasks concurrently using a pool of worker SC_THREADs. It allows users to specify the maximum number of concurrent threads and provides a simple interface for submitting tasks to be executed.
Definition at line 39 of file sc_thread_pool.h.
| scc::sc_thread_pool::sc_thread_pool | ( | ) |
Constructor for the sc_thread_pool class.
Definition at line 27 of file sc_thread_pool.cpp.
| void scc::sc_thread_pool::execute | ( | std::function< void(void)> | fct | ) |
Execute the given function in a separate SC_THREAD.
This method submits the given function to be executed in a separate thread. The function will be executed concurrently with other tasks submitted to the thread pool.
| fct | The function to be executed. |
Definition at line 32 of file sc_thread_pool.cpp.
| cci::cci_param<unsigned> scc::sc_thread_pool::max_concurrent_threads {"max_concurrent_threads", 16} |
The maximum number of concurrent threads in the thread pool.
This parameter allows users to specify the maximum number of concurrent threads that can be active in the thread pool at any given time. By default, the maximum number of concurrent threads is set to 16.
Definition at line 47 of file sc_thread_pool.h.