aboutsummaryrefslogtreecommitdiff
path: root/crates/arti-rpcserver/src/cancel.rs
Commit message (Collapse)AuthorAgeFilesLines
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-1/+1
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-2/+2
| | | | - `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
* tor-rtmock: allow-Decorate every use of MockSleepProviderIan Jackson2025-03-061-0/+1
| | | | | | | MockSleepProvider and MockSleepRuntime have been declared deprecated by the docs for some time. We're about to mark them `#[deprecated]`. This commit has been split out for clarity of review.
* cancel: Document deadlock/panic issue and how to avoid it.Nick Mathewson2025-01-221-2/+19
|
* cancel: Add a TODO about moving the Future inside the lock.Nick Mathewson2025-01-221-0/+5
|
* Cancel: Drop lock before calling waker.Nick Mathewson2025-01-221-0/+1
|
* cancel: Remove FusedFuture implementation.Nick Mathewson2025-01-221-12/+1
| | | | | | | Nothing used it, and it has some semantic complexity. (see https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2722#note_3149591 )
* cancel: Use Waker::clone_from to avoid needless clones.Nick Mathewson2025-01-221-1/+9
| | | | | | The Waker::clone_from implementation uses Waker::will_wake to avoid unnecessarily cloning a Waker that it already has a copy of.
* rpc: Strengthen guarantees from Cancel.Nick Mathewson2025-01-161-20/+124
| | | | | | | | | | | Cancellation is now fallable, which allows us to detect attempts to cancel which cannot work. We now guarantee that when you try to cancel a `Cancel<F>` future, either the cancel operation will succeed, or the future will return (or will have already returned) Ok(), but not both, and not neither. Closes #818.
* extract tor_async_utils::oneshot into ::oneshot-fused-workaroundJim Newsome2024-08-281-1/+1
| | | | | | | | | | | | | | Having this in the `tor-async-utils` crate prevents us from doing both of the following without introducing a circular dependency: * using it in `tor-rtmock` (which we currently do, particularly in tests). * using `tor-rtmock` to test things in `tor-async-utils`. We don't do this yet, but it is generally sensible to do so. In particular we want to move the `stream_peak` module there, which is currently tested with `tor-rtmock`. Moving this into its own crate avoids this circular dependency.
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* oneshot: Use veneer in arti-rpcserverIan Jackson2023-10-111-1/+2
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* rpc: Add standard warnings to arti-rpcserverNick Mathewson2023-04-121-0/+16
|
* rpc: Add a cancellable future type.Nick Mathewson2023-04-121-0/+133
Ordinarily you can cancel a future just by dropping it, but we'll want the ability to cancel futures that we no longer own (because we gave them to a `FuturesUnordered`).