Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

steps/co_async/previous_awaiter.hpp有问题 #11

Open
Ingsuifon opened this issue Aug 18, 2024 · 1 comment
Open

steps/co_async/previous_awaiter.hpp有问题 #11

Ingsuifon opened this issue Aug 18, 2024 · 1 comment

Comments

@Ingsuifon
Copy link

await_suspend需要判断mPrevious是否有效,否则在main()中创建的协程会恢复一个不存在的调用者。

@archibate
Copy link
Owner

不需要,因为在run_step中会将首个启动的协程的mPrevious设为noop_coroutine(),该协程是特殊的,执行没有任何效果,直接退出。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants