| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| |
| | |
Reported at
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2351#note_3062292
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
This will hopefully allow much caller code to be compiled out.
The users (IsParticipant impls) don't generally need to bother with
it - they can just ignore it.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Now if we run doctests without the feature enabled, we test that a
no-op MemoryQuotaTracker works.
Those tests aren't currently run in CI, but they will be after !2350.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Wrap up most of the structures in IfEnabled.
Sadly this diff is very noisy. I experimented with macros for the
little enabled check at the start of each function but they didn't
really help.
We don't test this yet. We'll do a smoke test of this later.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
We're going to bind self_ to something more complicated, in each of
these functions, and that's what all these field references etc. will
need to refer to.
Do this mechanical change first for clarity.
|
| | |
| |
| |
| | |
EnabledToken is pub because it's going to appear in public APIs.
|
| | | |
|
| |/
|
|
| |
This will make some later diffs easier to read.
|
| |
|
|
| |
We use `debug!` (tracing logging) everywhere else. Use it here too.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Each queue has two `Participation`s, not just one.
This didn't matter in the `lifecycle` test, because one of the two
Participations was never touched since it was cloned, and a fresh
clone starts out with a cache of zero.
But we're about to reuse this code in a context where both
Participations end up with a cache.
|
| | |
|
| |
|
|
|
| |
Discussed here
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059928
|
| |
|
|
| |
It's not a unit. It's `MpscUnboundedSpec` that's a unit
|
| |
|
|
|
|
|
| |
And MpscUnboundedSpec too.
As discussed in
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059516
|
| |
|
|
|
| |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059543
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059520
|
| |
|
|
|
| |
Fixes the livelock possibility discussed here
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059519
|
| |
|
|
|
|
|
|
| |
This will let us call mpsc::Receiver::close.
We have it take Pin, even though we don't really want that for our use
case, because if you use StreamUnobtrusivePeeker with a non-Unpin
stream you'll ant that.
|
| |
|
|
|
| |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059518
|
| |
|
|
|
| |
Requested by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059517
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
We'll use this in a moment.
|
| |
|
|
|
| |
We're going to want the one for Participation - it saves us an
annoying Option. Let's provide the one for WeakAccount too.
|
| |
|
|
|
|
|
|
|
|
| |
This is the result of:
```
for crate in $( ./maint/list_crates |grep '^\(tor\|arti-\)' ); do
cargo set-version -p $crate 0.21.0
done
```
|
| |
|
|
|
| |
See
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2280#note_3051134
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2280#note_3051270
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2280#note_3051268
|
| | |
|
| |
|
|
|
|
| |
I'm not particularly pleased with this name. We need names for both
the type, and the trait we'll almost certainly want to introduce in
the future.
|
| |\
| |
| |
| |
| | |
tor-memquota: HasMemoryCost trait, and type-safe methods
See merge request tpo/core/arti!2282
|
| | | |
|
| | |
| |
| |
| |
| | |
Trying to write comprehensive tests for the errors showed that these
impls were missing.
|
| | |
| |
| |
| | |
This will make testing easier.
|
| | |
| |
| |
| |
| | |
Bug found in review:
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2282#note_3051101
|
| | | |
|
| | |
| |
| |
| |
| | |
Our stream wrapper is going to want this. It's fiddly enough that
doing it as a standalone facility seems sensible.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
Now the constructor is able to return other data to the caller,
passing it through the mtracker machinery.
|
| | |
| |
| |
| |
| | |
I just want this for a test right now, bui it seems like it would be
good to expose it publicly.
|
| | |
| |
| |
| |
| | |
We're going to want this as the return value from an accessor
function, which cannot fail for any other reason.
|
| | |
| |
| |
| |
| | |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2281#note_3051105
|