Blender V5.0
thread Class Reference

#include <thread.h>

Public Member Functions

 thread (std::function< void()> run_cb)
 ~thread ()
bool join ()

Static Public Member Functions

static void * run (void *arg)

Protected Attributes

std::function< void()> run_cb_
std::thread std_thread
bool joined_

Detailed Description

Own thread implementation similar to std::thread, so we can set a custom stack size on macOS.

Definition at line 35 of file thread.h.

Constructor & Destructor Documentation

◆ thread()

CCL_NAMESPACE_BEGIN thread::thread ( std::function< void()> run_cb)

Definition at line 19 of file thread.cpp.

References false, joined_, run(), run_cb_, and std_thread.

Referenced by run().

◆ ~thread()

thread::~thread ( )

Definition at line 34 of file thread.cpp.

References join(), and joined_.

Member Function Documentation

◆ join()

bool thread::join ( )

Definition at line 48 of file thread.cpp.

References joined_, and std_thread.

Referenced by blender::gpu::GPUWorker::~GPUWorker(), and ~thread().

◆ run()

void * thread::run ( void * arg)
static

Definition at line 41 of file thread.cpp.

References self, and thread().

Referenced by thread().

Member Data Documentation

◆ joined_

bool thread::joined_
protected

Definition at line 50 of file thread.h.

Referenced by join(), thread(), and ~thread().

◆ run_cb_

std::function<void()> thread::run_cb_
protected

Definition at line 44 of file thread.h.

Referenced by thread().

◆ std_thread

std::thread thread::std_thread
protected

Definition at line 48 of file thread.h.

Referenced by join(), and thread().


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