| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
These are all aimed at figuring out in more detail what's going on
in #2079 and related issues.
|
| |
|
|
|
|
|
| |
This adds the `#[track_caller]` attribute to spawn-related trait method
impls, for traits implemented by the `implement_opaque_runtime` macro.
This is for compatibility with tokio-console.
|
| |
|
|
| |
These only serve as a compile-time check.
|
| |
|
|
| |
The future no longer needs to be `Send + 'static`.
|
| |
|
|
| |
Let's use Tokio terminology here.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Forbid re-entering the executor using ToplevelBlockOn::block_on.
This was always forbidden in the case of MockExecutor, but that meant
that tests using MockExecutor would malfunction if the code under test
needed to re-enter the executor from sync code (since the code under test
would have to use block_on, which wrong). See #1835.
Provide a function which *can* do this, reenter_block_on. The
MockExecutor needs to know the difference, and other runtimes may too.
They are conceptually quite different operations.
Introduce ToplevelRuntime as a convenience alias.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Document the new plan for blocking interaction in the trait-level
docs for the Blocking trait (used to be SpawnBlocking).
Add cross-references (in some cases to not-yet-existing pieces).
* Rename: spawn_blocking to spawn_thread. We're going to distinguish
thread-creation (relatively expensive) from brief entry to sync code
(relatively cheap, but more restricted).
* Rename the SpawnBlocking trait to Blocking, and its ThreadHandle
to ThreadHandle. This trait is going to gain more functionality.
* Add the missing mention of `Blocking` to the docs for `Runtime`.
|
| |
|
|
|
|
|
|
|
|
| |
We're going to distinguish top-level runtime entry, from *re*-entry to
an existing executor. It is most convenient to rename this trait
first. Documentation of the distinction will come later.
(We're going to retain the function name `block_on`, but we want the trait
to be more obviously a top-level only thing, though, so we give it a
name that will hopefully avoid it peroulating throughout the codebase..)
|
| |
|
|
|
|
| |
This is unfortunately necessary, because after the channel handshake, we
need to give the channel reactor a `StreamOps` handle to the underlying
stream.
|
| |
|
|
| |
Due to the limitations on RPIT, it's better to use a GAT for now.
|
| |
|
|
|
| |
This adds a new SpawnBlocking trait, which exposes the spawn_blocking
function that tokio, async-std, and other runtimes have.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(And similarly rename TcpListener to NetStreamListener,
along with their TcpStream/TcpListener associated types.)
These types are about to become generic over addresses,
and therefore shouldn't be named after TCP.
Renaming was done mostly with Rust Analyzer,
except for some macros that needed to be hand-edited.
(I'll revise the comments in the next commit;
this one is all about renaming.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Add a function to get the keying material as detailed by RFC 5705.
Because native-tls doesn't have such support, there is a place holder
panic!() for now.
This means that for the forseable future, relay would only work with
rustls until we figure out a solution for native-tls.
Closes #1432
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Now all our non-mock runtime types impl CoarseTimeProvider.
|
| | |
|
| |
|
|
|
|
|
|
| |
Now all of the runtime types we provide all
impl<S> TlsProvider<S> where S: ...
rather than merely TlsProvider<Self::TcpStream>.
And we document and intent to perhaps require this in the future.
|
| |
|
|
|
| |
This avoids a future confusion with the new `SpawnBlocking` trait in
async_executors v0.5, and better describes what the trait provides.
|
| |
|
|
|
| |
This will make it easier to implement them using some other TLS
provider as well, without having to duplicate all of our code.
|
|
|
We're soon going to have our different Runtime types be built as
CompoundRuntime instances. We don't want to expose that detail,
though, so we'll use this macro to make them implement the right
traits.
|