dfx 0.1.0
Linux-based dynamic dataflow executor
Loading...
Searching...
No Matches
dfx::Utils::Thread Namespace Reference

Functions

void setName (std::string_view name, std::error_code &ec) noexcept
 Set the calling thread name.
void setName (std::string_view name)
 Set the calling thread name.
std::string getName (std::error_code &ec) noexcept
 Get the calling thread name.
std::string getName ()
 Get the calling thread name.

Function Documentation

◆ getName() [1/2]

std::string dfx::Utils::Thread::getName ( )

Get the calling thread name.

Returns
The current thread name.

Convenience overload of getName(std::error_code&). On failure, this overload reports the error by throwing

◆ getName() [2/2]

std::string dfx::Utils::Thread::getName ( std::error_code & ec)
noexcept

Get the calling thread name.

Parameters
ecOutput error code. Set to a non-zero value on failure; cleared on success.
Returns
The current thread name on success; an empty string on failure.

Retrieves the name of the current thread. On failure, the function does not throw and instead reports the error via ec.

◆ setName() [1/2]

void dfx::Utils::Thread::setName ( std::string_view name)

Set the calling thread name.

Parameters
nameNew thread name.

Convenience overload of setName(std::string_view,std::error_code&). On failure, this overload reports the error by throwing.

◆ setName() [2/2]

void dfx::Utils::Thread::setName ( std::string_view name,
std::error_code & ec )
noexcept

Set the calling thread name.

Parameters
nameNew thread name.
ecOutput error code. Set to a non-zero value on failure; cleared on success.

Sets the name of the current thread to name. On failure, the function does not throw and instead reports the error via ec.