地址:http://en.cppreference.com/w/cpp/thread
Thread support library
|
|
Threads
Threads enable the program to execute across several processor cores.
//线程使程序可以跨多个核(心)运行。
|
Defined in header
<thread> //定义在<thread>头文件
|
|
|
(C++11)
|
manages a separate thread //管理一个独立线程 (class) |
Functions managing the current thread//管理当前线程的函数 |
|
|
Defined in namespace
this_thread //定义在名字空间域this_thread
|
|
|
(C++11)
|
hints the implementation to reschedule execution of threads (function)//提示实现重新安排线程的执行,即调用yield将降低优先级。 |
| </ | |

C++11的线程支持库提供了线程、互斥量和条件变量等功能,允许程序跨多核执行,确保线程间的同步与资源访问控制。互斥量防止数据竞争,条件变量用于线程等待通知或超时,而未来则涉及异步计算的结果获取。
最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



