std::packaged_task<R(Args...)>:: swap
From cppreference.net
<
cpp
|
thread
|
packaged task
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::packaged_task
| Member functions | ||||
|
packaged_task::swap
|
||||
| Getting the result | ||||
| Execution | ||||
| Non-member functions | ||||
| Helper classes | ||||
|
(until C++17)
|
||||
| Deduction guides (C++17) |
|
void
swap
(
packaged_task
&
other
)
noexcept
;
|
(C++11 起) | |
交换 * this 与 other 的共享状态及存储任务。
参数
| 其他 | - | 要交换状态的 packaged task |
返回值
(无)
参见
|
(C++11)
|
特化
std::swap
算法
(函数模板) |