Elementa v8.0.0
Minimalistic library for any C++ application (C++11 and up)
Loading...
Searching...
No Matches
threads.h
Go to the documentation of this file.
1
3#include "elementa/license.inc"
4#include "elementa/checks.inc"
5
6#ifndef ELEMENTA_BASE_THREADS_H
7#define ELEMENTA_BASE_THREADS_H
8
9#include <string>
10#include <sstream>
11#include <thread>
12#include <mutex>
13
14namespace elementa
15{
16
17namespace base
18{
19
38/* ****************************************************************************
39
40 Function: to_string(std::thread::id)
41
42******************************************************************************/
43
45
50inline std::string threadid_to_string(const std::thread::id & thrid)
51{
52 std::stringstream ss;
53 ss << thrid;
54 return(ss.str());
55}
56
57
58 // Threads
60
61
62} // end namespace base
63
64} // end namespace elementa
65
66#endif
std::string threadid_to_string(const std::thread::id &thrid)
Convert a thread id to text.
Definition: threads.h:50