赞
踩
//默认构造函数 thread() noexcept; //初始化构造函数 template <class Fn, class... Args> explicit thread(Fn&& fn, Args&&... args); //拷贝构造函数 [deleted] thread(const thread&) = delete; //Move 构造函数 thread(thread&& x) noexcept;
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 默认构造函数,创建一个空的
std::thread
执行对象。- 初始化构造函数,创建一个
std::thread
对象,该std::thread
对象可被joinable
,新产生的线程会调用fn
函数,该函数的参数由args
给出。- 拷贝构造函数(被禁用),意味着
std::thread
对象不可拷贝构造。- Move 构造函数,move 构造函数(move 语义是 C++11 新出现的概念,详见附录),调用成功之后
x
不代表任何std::thread
执行对象。
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/853833
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。