Blender V4.3
blender::lazy_threading::HintReceiver Class Reference

#include <BLI_lazy_threading.hh>

Public Member Functions

 HintReceiver (FunctionRef< void()> fn)
 
 ~HintReceiver ()
 

Detailed Description

Used by the task scheduler to receive hints from current tasks that they will take a while. This should only be allocated on the stack.

Definition at line 74 of file BLI_lazy_threading.hh.

Constructor & Destructor Documentation

◆ HintReceiver()

blender::lazy_threading::HintReceiver::HintReceiver ( FunctionRef< void()> fn)

The passed in function is called when a task signals that it will take a while.

Note
The function has to stay alive after the call to the constructor. So one must not pass a lambda directly into this constructor but store it in a separate variable on the stack first.

Definition at line 31 of file lazy_threading.cc.

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

◆ ~HintReceiver()

blender::lazy_threading::HintReceiver::~HintReceiver ( )

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