Blender V4.3
blender::lazy_threading Namespace Reference

Classes

class  HintReceiver
 
class  ReceiverIsolation
 

Typedefs

using HintReceivers = RawStack<RawVector<FunctionRef<void()>, 0>, 0>
 

Functions

void send_hint ()
 

Variables

static thread_local HintReceivers hint_receivers
 

Typedef Documentation

◆ HintReceivers

This uses a "raw" stack and vector so that it can be destructed after Blender checks for memory leaks. A new list of receivers is created whenever an isolated region is entered to avoid deadlocks.

Definition at line 16 of file lazy_threading.cc.

Function Documentation

◆ send_hint()

void blender::lazy_threading::send_hint ( )

Tell task schedulers on the current thread that it is about to start a long computation and that other waiting tasks should better be moved to another thread if possible.

Definition at line 24 of file lazy_threading.cc.

References hint_receivers, and blender::Stack< T, InlineBufferCapacity, Allocator >::peek().

Referenced by BLI_task_parallel_range(), blender::nodes::node_geo_mesh_primitive_ico_sphere_cc::create_ico_sphere_mesh(), blender::threading::parallel_invoke(), and blender::threading::parallel_reduce().

Variable Documentation

◆ hint_receivers

thread_local HintReceivers blender::lazy_threading::hint_receivers
static