Blender  V3.3
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | List of all members
TaskPool Class Reference

#include <task.h>

Classes

struct  Summary
 

Public Member Functions

 TaskPool ()
 
 ~TaskPool ()
 
void push (TaskRunFunction &&task)
 
void wait_work (Summary *stats=NULL)
 
void cancel ()
 

Static Public Member Functions

static bool canceled ()
 

Public Attributes

TaskPoolType type
 
bool use_threads
 
ThreadMutex user_mutex
 
voiduserdata
 
volatile bool is_suspended
 
BLI_mempoolsuspended_mempool
 
ListBase background_threads
 
ThreadQueuebackground_queue
 
volatile bool background_is_canceling
 

Protected Attributes

tbb::task_group tbb_group
 
double start_time
 
int num_tasks_pushed
 

Detailed Description

Definition at line 141 of file task_pool.cc.

Constructor & Destructor Documentation

◆ TaskPool()

CCL_NAMESPACE_BEGIN TaskPool::TaskPool ( )

Definition at line 14 of file task.cpp.

◆ ~TaskPool()

TaskPool::~TaskPool ( )

Definition at line 18 of file task.cpp.

References cancel().

Member Function Documentation

◆ cancel()

void TaskPool::cancel ( )

Definition at line 41 of file task.cpp.

References num_tasks_pushed, and tbb_group.

Referenced by ~TaskPool().

◆ canceled()

bool TaskPool::canceled ( )
static

Definition at line 50 of file task.cpp.

◆ push()

void TaskPool::push ( TaskRunFunction &&  task)

◆ wait_work()

void TaskPool::wait_work ( Summary stats = NULL)

Member Data Documentation

◆ background_is_canceling

volatile bool TaskPool::background_is_canceling

Definition at line 158 of file task_pool.cc.

Referenced by background_task_pool_cancel(), and background_task_pool_canceled().

◆ background_queue

ThreadQueue* TaskPool::background_queue

◆ background_threads

ListBase TaskPool::background_threads

◆ is_suspended

volatile bool TaskPool::is_suspended

◆ num_tasks_pushed

int TaskPool::num_tasks_pushed
protected

Definition at line 62 of file task.h.

Referenced by cancel(), push(), and wait_work().

◆ start_time

double TaskPool::start_time
protected

Definition at line 59 of file task.h.

Referenced by wait_work().

◆ suspended_mempool

BLI_mempool* TaskPool::suspended_mempool

◆ tbb_group

tbb::task_group TaskPool::tbb_group
protected

◆ type

TaskPoolType TaskPool::type

◆ use_threads

bool TaskPool::use_threads

◆ user_mutex

ThreadMutex TaskPool::user_mutex

Definition at line 145 of file task_pool.cc.

Referenced by BLI_task_pool_free(), BLI_task_pool_user_mutex(), and task_pool_create_ex().

◆ userdata

void* TaskPool::userdata

Definition at line 146 of file task_pool.cc.

Referenced by BLI_task_pool_user_data(), and task_pool_create_ex().


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