Minimal, generic thread pool for CPU-side data pipeline work (fetch, decode, transform, collate stages) – campaign_exai_dl_library_data_pipeline's staged- pipeline backbone alongside BoundedQueue. Deliberately not tied to Dataset/DataLoader types.
More...
#include <data_thread_pool.hpp>
Minimal, generic thread pool for CPU-side data pipeline work (fetch, decode, transform, collate stages) – campaign_exai_dl_library_data_pipeline's staged- pipeline backbone alongside BoundedQueue. Deliberately not tied to Dataset/DataLoader types.
- Note
- This is pulsatrix's first concurrent code path. No production DataLoader path exercises this class yet in Phase 1 – see bounded_queue.hpp's matching note.
◆ DataThreadPool() [1/2]
| pulsatrix::DataThreadPool::DataThreadPool |
( |
unsigned |
num_threads | ) |
|
|
explicit |
◆ ~DataThreadPool()
| pulsatrix::DataThreadPool::~DataThreadPool |
( |
| ) |
|
◆ DataThreadPool() [2/2]
◆ operator=()
◆ submit()
template<typename F >
| auto pulsatrix::DataThreadPool::submit |
( |
F && |
task | ) |
-> std::future<std::invoke_result_t<F>> |
|
inline |
Enqueues a task for execution by a worker thread.
- Returns
- A future resolving to the task's return value (or exception, if it throws).
- Exceptions
-
| std::runtime_error | if the pool has already been stopped (destructor entered) – external boundary: a caller submitting after shutdown has begun is a real usage error a well-formed caller can still trigger under a race. |
The documentation for this class was generated from the following file: