| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Since we renamed PollingStream and NonblockingStream to
BlockingConnection and NonblockingConnection, it no longer makes
sense to refer to them as streams, or put them in variables called
"stream".
|
| |
|
|
|
| |
Since we are no longer calling these types "streams" I've decided to
revert to the old name for this module.
|
| | |
|
| | |
|
| |
|
|
| |
Typos found with codespell
|
| |
|
|
|
| |
This commit adds FFI wrappers for the "poll" API, which lets the
user integrate with a poll(2)-style event loop.
|
| |\
| |
| |
| |
| | |
Fix various typos
See merge request tpo/core/arti!3781
|
| | | |
|
| |/ |
|
| |\
| |
| |
| |
| | |
rpc: API for event-driven IO.
See merge request tpo/core/arti!3652
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Per discussion, it makes more sense to have the API be one
that gets called when our IO interests change.
Additionally, this commit removes the try_reading and try_writing
booleans, as previously discussed.
I've left a couple of XXXX comments where more documentation or
thought is likely needed.
|
| | |
| |
| |
| |
| |
| |
| | |
This API provides the necessary functionality to use an RpcConn
inside a poll-like event loop.
This is part of #1856.
|
| | | |
|
| | |
| |
| | |
(from Diziet)
|
| | | |
|
| | |
| |
| |
| | |
This is based on a pad with input from nickm and Diziet
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit finally adds a `RpcConn::submit()` method to send a
request without having to wait on it specifically, and an
`RpcConn::wait()` method to wait for the next response from _any_
such request.
Thanks to the previous patches, this is relatively simple!
This is part of #1856.
|
| | |
| |
| |
| |
| |
| | |
In order to implement tagged pollable requests, we need a separate
response queue for them, and we need to dispatch requests to that
queue as appropriate.
|
| | |
| |
| |
| |
| |
| |
| | |
For pollable requests, we'll want to associate each one with a tag.
But we'd rather not carry tags around for _every_ pending request:
it would waste space and lead to possible errors. So instead we
add a Tag type as a member of QueueId.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In order to implement this part of #1856, we will internally divide
requests into two kinds: "Waitable" and "Pollable". Waitable
requests are the kind that we have now: They are created with an
"execute" method. They each have their own response queue and their
own condvar, and in order to see if they have any responses, the
caller needs to call some kind of request-specific method.
Pollable requests are the ones we will add. They are created with a
"submit" method, and associated with a user-provided tag.
They all share the same queue and the same condvar.
To see if any of them have a response, the caller will run a
function that returns tagged responses.
In order to support this division, this commit:
- turns `RequestState` into an enum,
- makes `ResponseQueue` into its own type,
- Adds a trait that will be implemented by every type that can
identify a response queue.
|
| |/ |
|
| | |
|
| |
|
|
| |
All the tests still pass!
|
| |
|
|
|
| |
This will be necessary since, in order to make the RPC stuff
nonblocking, we'll need a better API than just `Box<dyn Read>` etc.
|
| | |
|
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Example:
```text
warning: doc list item overindented
--> crates/arti-rpc-client-core/src/conn/connimpl.rs:322:9
|
322 | /// indicates that no more messages will be received for this request.
| ^^^ help: try using ` ` (2 spaces)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
note: the lint level is defined here
--> crates/arti-rpc-client-core/src/lib.rs:8:9
|
8 | #![warn(clippy::all)]
| ^^^^^^^^^^^
= note: `#[warn(clippy::doc_overindented_list_items)]` implied by `#[warn(clippy::all)]`
```
|
| |
|
|
| |
- `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
|
| |
|
|
|
|
|
| |
In general, we try to obey the convention that an error's Display
method does not display that error's sources.
Part of #1650.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This type explains where every error came from, and explains why
each declined connect point was declined.
|
| | |
|
| |
|
|
| |
Subsequent commits will pipe this information forward to our errors.
|
| |
|
|
|
|
|
|
| |
Also change corresponding message.
This way, it will be clear that we're just reporting that Arti
gave us an error—not that the error necessarily means that the
authentication itself was "wrong".
|
| |
|
|
|
|
|
|
|
|
|
| |
The execute_internal_ok method converts every error response into an
internal error; as such, it's only appropriate when there is no way
for a well-behaved Arti instance to give an error response.
But we had been using it in a few places where errors were possible
under other circumstances.
This commit fixes that behavior, and adds documentation to help
avoid it.
|