-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add CancellationToken #2263
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
Merged
Merged
Add CancellationToken #2263
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
0292eef
Add CancellationToken
Matthias247 158f2f9
Run unit-tests not under loom
Matthias247 a5e5b93
Unregister from parent token only if it's the last reference
Matthias247 bcaa2f5
Remove parent reference count when unregistering from it
Matthias247 e2dc183
unregister from parent after refcount reached 0
Matthias247 96d0910
Update tokio/src/util/intrusive_double_linked_list.rs
Matthias247 ba7eeba
Update tokio/src/util/intrusive_double_linked_list.rs
Matthias247 1490096
Drop parent ref outside of Mutex
Matthias247 23a1d09
Add more tests for the refcounts of the CancellationToken
Matthias247 e67257f
f
Matthias247 53a6a88
store the parent before decrementing the refcount on the child
Matthias247 126b37e
Fix backward link between child tokens
Matthias247 9dce96c
Fix has_refs
Matthias247 53bf8bb
Use a maximum of 3 threads in loom tests
Matthias247 aa3d098
Move CancellationToken into scope
Matthias247 aded3f9
Fix rustfmt and clippy warnings
Matthias247 6e40034
Fix more clippy and rustfmt errors
Matthias247 93df33f
Fix loom test location
Matthias247 a23aa0d
Rename wait_for_cancellation to cancelled
Matthias247 e2f303b
Move public types to the top
Matthias247 02b3d4d
Move CancellationToken into sync module
Matthias247 3becd46
remove scope feature
Matthias247 5156d84
CI bump
carllerche File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Oops, something went wrong.
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.
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.
can we pull what you use in here into tokio-test?
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.
Only imports count_waker, since I didn't want to write it myself and it adds some value in the tests. Could be integrated into tokio too.