BitMagic-C++
bm::thread_pool_executor< TPool > Class Template Reference

Utility class to submit task batch to the running thread pool and optionally wait for it getting done. More...

#include <bmthreadpool.h>

Public Types

typedef TPool thread_pool_type
typedef task_batch_base::size_type size_type

Public Member Functions

 thread_pool_executor ()

Static Public Member Functions

static void run (thread_pool_type &tpool, bm::task_batch_base &tasks, bool wait_for_batch)
static void wait_for_batch_done (thread_pool_type &tpool, bm::task_batch_base &tasks, task_batch_base::size_type from_idx, task_batch_base::size_type to_idx)
 Check if all batch jobs in the specified interval are done Spin wait if not.

Detailed Description

template<typename TPool>
class bm::thread_pool_executor< TPool >

Utility class to submit task batch to the running thread pool and optionally wait for it getting done.

Definition at line 330 of file bmthreadpool.h.

Member Typedef Documentation

◆ size_type

template<typename TPool>
typedef task_batch_base::size_type bm::thread_pool_executor< TPool >::size_type

Definition at line 334 of file bmthreadpool.h.

◆ thread_pool_type

template<typename TPool>
typedef TPool bm::thread_pool_executor< TPool >::thread_pool_type

Definition at line 333 of file bmthreadpool.h.

Constructor & Destructor Documentation

◆ thread_pool_executor()

template<typename TPool>
bm::thread_pool_executor< TPool >::thread_pool_executor ( )
inline

Definition at line 337 of file bmthreadpool.h.

Member Function Documentation

◆ run()

◆ wait_for_batch_done()

template<typename TPool>
void bm::thread_pool_executor< TPool >::wait_for_batch_done ( thread_pool_type & tpool,
bm::task_batch_base & tasks,
task_batch_base::size_type from_idx,
task_batch_base::size_type to_idx )
static

Check if all batch jobs in the specified interval are done Spin wait if not.

Definition at line 548 of file bmthreadpool.h.

References BM_ASSERT, bm::task_descr::done, bm::task_batch_base::get_task(), and bm::task_batch_base::size().

Referenced by run().


The documentation for this class was generated from the following file: