C++11this_threadget_id(9)
原文地址:http://www.cplusplus.com/reference/thread/this\_thread/get\_id/
function
std::this_thread::get_id
thread::id get_id() noexcept;
Get thread id
Returns the thread id of the calling thread.
返回当前调用的线程ID。
This value uniquely identifies the thread.
该值独一地标识了一个线程。
Parameters
none
Return value
An object of member type thread::id that uniquely identifies the thread.
返回一个线程ID值独一地标识了一个线程。
Example
1 | 1 |
1 | // thread::get_id / this_thread::get_id |
Output:
This is the main thread.
This is not the main thread.
Exception safety
No-throw guarantee: never throws exceptions.
—————————————————————————————————————————————————————————————————
//写的错误或者不好的地方请多多指导,可以在下面留言或者点击左上方邮件地址给我发邮件,指出我的错误以及不足,以便我修改,更好的分享给大家,谢谢。
转载请注明出处:http://blog.csdn.net/qq844352155
author:天下无双
Email:coderguang@gmail.com
2014-9-4
于GDUT
——————————————————————————————————————————————————————————————————
- 本文作者: royalchen
- 本文链接: http://www.royalchen.com/2016/02/24/c11this-threadget-id9/
- 版权声明: 本博客所有文章除特别声明外,均采用 MIT 许可协议。转载请注明出处!