Blender V5.3
blender::CacheMutex Class Reference

#include <BLI_cache_mutex.hh>

Public Member Functions

void ensure (const FunctionRef< void()> compute_cache)
void tag_dirty ()
bool is_dirty () const
bool is_cached () const

Detailed Description

Definition at line 72 of file BLI_cache_mutex.hh.

Member Function Documentation

◆ ensure()

void blender::CacheMutex::ensure ( const FunctionRef< void()> compute_cache)
inline

Make sure the cache exists and is up to date. This calls compute_cache once to update the cache (which is stored outside of this class) if it is dirty, otherwise it does nothing.

This function is thread-safe under the assumption that the same parameters are passed from every thread.

Definition at line 85 of file BLI_cache_mutex.hh.

Referenced by blender::nodes::ensure_geometry_nodes_lazy_function_graph(), blender::ensure_inference_usage_cache(), blender::bke::node_tree_runtime::ensure_topology_cache(), blender::fn::FieldInput::field_inputs(), and blender::bke::get_tree_zones().

◆ is_cached()

bool blender::CacheMutex::is_cached ( ) const
inline

Return true if the cache exists and is valid.

Definition at line 113 of file BLI_cache_mutex.hh.

Referenced by is_dirty().

◆ is_dirty()

bool blender::CacheMutex::is_dirty ( ) const
inline

Return true if the cache currently does not exist or has been invalidated.

Definition at line 105 of file BLI_cache_mutex.hh.

References is_cached().

Referenced by blender::bke::node_tree_runtime::topology_cache_is_available().

◆ tag_dirty()

void blender::CacheMutex::tag_dirty ( )
inline

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