-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
docs: add semaphore example #6038
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR. Overall, I think the example is good. I have some comments to improve the phrasing.
4bcb5c4
to
b1a3d9f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes! They look good. I have a few more grammar suggestions, and some minor additions to the tests.
b1a3d9f
to
ed687e2
Compare
ed687e2
to
7d40a8a
Compare
6b24580
to
b6fd79f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please double-check how the documentation looks when rendered. You can find the command for doing that in the CONTRIBUTING.md file, or you can push and let our CI setup render it. The result is visible at: https://deploy-preview-6038--tokio-rs.netlify.app/tokio/sync/struct.semaphore
…llel. Signed-off-by: Muhan Song <[email protected]>
bf50e91
to
8f6733e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. This looks good to me.
Thank you for your precious time :) |
Motivation
Add last example to semaphore described at this issue
Solution
A simple example that prevent several tests from running at the same time, using a static semaphore with one permit.
Rendered