Fixposition SDK 0.0.0-heads/main-0-g7b59b93
Collection of c++ libraries and apps for use with Fixposition products
Loading...
Searching...
No Matches
fpsdk::common::thread Namespace Reference

Thread helpers. More...

Classes

class  BinarySemaphore
 A binary semaphore, useful for thread synchronisation. More...
 
class  Thread
 Helper class for handling threads. More...
 

Functions

void SetThreadName (const std::string &name)
 Set thread name.
 
std::size_t ThisThreadId ()
 Get numeric thread ID.
 

Detailed Description

Thread helpers.

Function Documentation

◆ SetThreadName()

void fpsdk::common::thread::SetThreadName ( const std::string & name)

Set thread name.

Sets the thread name, which shows in htop etc.

Parameters
[in]nameThe thread name (1-6 characters, longer name is clipped at 6 chars)

◆ ThisThreadId()

std::size_t fpsdk::common::thread::ThisThreadId ( )

Get numeric thread ID.

Like std::this_thread::get_id(), but numeric (and therefore printf()-able, etc.).