|
faio
faio 公共 C++ 接口参考
|
惰性的、移动独占的协程任务。 更多...
Public 类型 | |
| using | scheduler_type = S |
| 驱动此任务的调度器类型。 | |
| using | value_type = T |
| 任务完成后的值类型。 | |
Public 成员函数 | |
| task () noexcept=default | |
| 构造task对象。 | |
| task (task &&other) noexcept | |
| 构造task对象。 | |
| auto | operator co_await () &&noexcept |
| 把任务的结果消费权交给等待方。 | |
| task | with_no_stealing () && |
| 禁止本任务及后代被队列窃取。 | |
| task | with_stealing () && |
| 显式请求允许窃取。 | |
| task | with_bind_core () && |
| 首次启动绑定当前 worker 及其已验证 CPU,并禁止窃取。 | |
| task | with_no_bind_core () && |
| 显式请求不绑核,不自动允许窃取。 | |
| template<class Policy> | |
| task | with_lifecycle (Policy &&policy) && |
| 给任务设置首次执行前和退出后的回调。 | |
| template<class Before, class After> | |
| task | with_lifecycle (Before &&before, After &&after) && |
| 给任务设置首次执行前和退出后的回调。 | |
惰性的、移动独占的协程任务。
|
defaultnoexcept |
构造task对象。
|
noexcept |
构造task对象。
| other | 被复制、移动或比较的同类型对象;移动后源对象按该类型约定变空。 |
|
noexcept |
把任务的结果消费权交给等待方。
| task faio::task< T, S >::with_no_stealing | ( | ) | && |
禁止本任务及后代被队列窃取。
| task faio::task< T, S >::with_stealing | ( | ) | && |
显式请求允许窃取。
| task faio::task< T, S >::with_bind_core | ( | ) | && |
首次启动绑定当前 worker 及其已验证 CPU,并禁止窃取。
| task faio::task< T, S >::with_no_bind_core | ( | ) | && |
显式请求不绑核,不自动允许窃取。
| task faio::task< T, S >::with_lifecycle | ( | Policy && | policy | ) | && |
给任务设置首次执行前和退出后的回调。
| policy | 按值保存的策略,满足 task_lifecycle_policy。 |
| task faio::task< T, S >::with_lifecycle | ( | Before && | before, |
| After && | after ) && |
给任务设置首次执行前和退出后的回调。
| before | 首次执行前调用的无参回调。 |
| after | 退出时接收 const task_exit& 的 noexcept 回调。 |