BitMagic-C++
Public Types | Public Member Functions | Data Fields
bm::task_descr Struct Reference

BitMagic task with a captured function. More...

#include <bmtask.h>

Public Types

enum  task_flags { no_flag = 0 , barrier_ok = 1u , barrier_any = (1u << 1) , barrier_ok_delayed = (1u << 2) }
 

Public Member Functions

 task_descr () BMNOEXCEPT
 
 task_descr (const task_descr &td)
  More...
 
 task_descr (task_function_t f, void *argptr=0) noexcept
  More...
 
void init (task_function_t f, void *argptr) noexcept
  More...
 
int run ()
  More...
 

Data Fields

task_function_t func
 captured function callback More...
 
void * argp
 arg pointer More...
 
bm::id64_t flags
 task flags to designate barriers More...
 
int err_code
 error code More...
 
std::atomic_bool done
 0 - pending More...
 

Detailed Description

BitMagic task with a captured function.

Definition at line 61 of file bmtask.h.

Member Enumeration Documentation

◆ task_flags

Enumerator
no_flag 

no flag specified

barrier_ok 

barrier waits all prev.tasks done without error

barrier_any 

barrier waits all prev tasks done (success or not)

barrier_ok_delayed 

Definition at line 63 of file bmtask.h.

Field Documentation

◆ argp

void* bm::task_descr::argp

◆ done

std::atomic_bool bm::task_descr::done

◆ err_code

int bm::task_descr::err_code

◆ flags

bm::id64_t bm::task_descr::flags

task flags to designate barriers

Definition at line 75 of file bmtask.h.

Referenced by init(), bm::thread_pool_executor< TPool >::run(), and task_descr().

◆ func

task_function_t bm::task_descr::func

captured function callback

Definition at line 71 of file bmtask.h.

Referenced by init(), run(), bm::thread_pool_executor< TPool >::run(), task_descr(), and bm::thread_pool< QValue, Lock >::worker_func().


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