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

大神,怎么可以做到同步方式写代码 #6

Open
oj-learn opened this issue Nov 25, 2021 · 0 comments
Open

大神,怎么可以做到同步方式写代码 #6

oj-learn opened this issue Nov 25, 2021 · 0 comments

Comments

@oj-learn
Copy link

oj-learn commented Nov 25, 2021

比如:有
xxx f1() {
...
f2(); // 调用f2后可能会suspend

// 同步代码
.....
.....
}
xxx f2(){
co_await event.wait_for(1000ms); // 没有signal时suspend
}

@oj-learn oj-learn changed the title 大哥,GCC 11可以用了吗. 大神,怎么可以做到同步方式写代码 Nov 29, 2021
@oj-learn oj-learn reopened this Nov 29, 2021
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

1 participant