-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Support c++20 coroutine #2121
Merged
Merged
Support c++20 coroutine #2121
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@wwbmmm 你可以加一个文档大概说一下实现原理和使用方式么(和当前直接用bthread的区别和注意事项) |
好的 |
已补充文档 |
加了experimental命名空间 |
如果调整系统的mmap_max_count,可以达到coroutine一样的效果吗 |
这样只是增加了bthread数量的上限。但是bthread的堆栈内存占用、堆栈切换开销还是会比coroutine更大。 |
jiangdongzi
pushed a commit
to jiangdongzi/brpc
that referenced
this pull request
Jan 31, 2024
* Support c++20 coroutine * Fix CI UT failed * Add example coroutine Makefile * Add usercode_in_coroutine flag * Add coroutine document * Add experimental namespace for coroutine
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number:
Problem Summary: Support c++20 coroutine
What is changed and the side effects?
Changed: New feature
Side effects:
Performance effects(性能影响):
example/coroutine
, start server withtaskset -c 1 ./coroutine_server -enable_coroutine=1 -sleep_us=100
, start rpc_press with../../tools/rpc_press/rpc_press -proto=./echo.proto -method=example.EchoService.Proxy -input='{"message":"hello"}' -qps=0 -thread_num=100 -duration=0 -server=0.0.0.0:8000 -timeout_ms=2000 -connection_type=pooled
, the result is :-enable_coroutine=0
, the result is :Breaking backward compatibility(向后兼容性): No
Check List: