MRPT  2.0.4
thread_name.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
11 #include <string>
12 #include <thread>
13 
14 namespace mrpt::system
15 {
16 /** Sets the name of the given thread; useful for debuggers.
17  * \ingroup mrpt_system_grp
18  * \note New in MRPT 2.0.4
19  */
20 void thread_name(const std::string& name, std::thread& theThread);
21 
22 /** Sets the name of the current thread; useful for debuggers.
23  * \ingroup mrpt_system_grp
24  * \note New in MRPT 2.0.4
25  */
26 void thread_name(const std::string& name);
27 
28 /** Gets the name of the given thread; useful for debuggers.
29  * \ingroup mrpt_system_grp
30  * \note New in MRPT 2.0.4
31  */
32 std::string thread_name(std::thread& theThread);
33 
34 /** Gets the name of the current thread; useful for debuggers.
35  * \ingroup mrpt_system_grp
36  * \note New in MRPT 2.0.4
37  */
38 std::string thread_name();
39 
40 } // namespace mrpt::system
void thread_name(const std::string &name, std::thread &theThread)
Sets the name of the given thread; useful for debuggers.
Definition: thread_name.cpp:63



Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020