BitMagic-C++
Public Types | Public Member Functions | Static Public Member Functions
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)
  More...
 
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. More...
 

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 Function Documentation

◆ run()

template<typename TPool >
void bm::thread_pool_executor< TPool >::run ( thread_pool_type tpool,
bm::task_batch_base tasks,
bool  wait_for_batch 
)
static

◆ 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().


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