NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
task< T >::awaiter结构体 参考

任务等待器 更多...

#include <generator.hpp>

Public 成员函数

bool await_ready () const noexcept
 检查是否可立即恢复
coroutine_handle await_suspend (coroutine_handle<> continuation) noexcept
 暂停时执行的操作
await_resume ()
 恢复时获取结果

Public 属性

coroutine_handle< promise_typehandle
 协程句柄

详细描述

template<typename T>
struct task< T >::awaiter

任务等待器

在文件 generator.hpp554 行定义.

成员函数说明

◆ await_ready()

template<typename T>
bool task< T >::awaiter::await_ready ( ) const
inlinenoexcept

检查是否可立即恢复

返回
如果任务已完成则返回true

在文件 generator.hpp561 行定义.

引用了 handle.

◆ await_resume()

template<typename T>
T task< T >::awaiter::await_resume ( )
inline

恢复时获取结果

返回
任务结果

在文件 generator.hpp577 行定义.

引用了 handle, move() , 以及 rethrow_exception().

◆ await_suspend()

template<typename T>
coroutine_handle task< T >::awaiter::await_suspend ( coroutine_handle<> continuation)
inlinenoexcept

暂停时执行的操作

参数
continuation继续执行的协程
返回
要恢复的协程

在文件 generator.hpp568 行定义.

引用了 handle.


该结构体的文档由以下文件生成: