Kanzi  3.9.4
Kanzi Engine API
kanzi::ResourceLoaderThreadContext Struct Reference

Resource loader thread local data. More...

#include <kanzi/core.ui/resource/resource.hpp>

Public Member Functions

string_view getShortThreadName () const
 Returns the short name of the thread that is doing the loading. More...
 
string_view getThreadName () const
 Returns the name of thread that is doing the loading. More...
 
 ResourceLoaderThreadContext (string_view name, string_view shortName)
 Constructor. More...
 

Detailed Description

Resource loader thread local data.

Constructor & Destructor Documentation

◆ ResourceLoaderThreadContext()

kanzi::ResourceLoaderThreadContext::ResourceLoaderThreadContext ( string_view  name,
string_view  shortName 
)
explicit

Constructor.

Parameters
nameName of the loader thread.
shortNameShortened name of the loader thread, to be set as thread native name.

Member Function Documentation

◆ getThreadName()

string_view kanzi::ResourceLoaderThreadContext::getThreadName ( ) const
inline

Returns the name of thread that is doing the loading.

Used by resource profiling to make it human-readable.

Returns
The name of the active thread.

◆ getShortThreadName()

string_view kanzi::ResourceLoaderThreadContext::getShortThreadName ( ) const
inline

Returns the short name of the thread that is doing the loading.

Kanzi uses this function to set the thread native name and as a callback parameter for easier machine parsing.

Returns
The short name of the active thread.

The documentation for this struct was generated from the following file: