-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Make client able to use non-Send executor #3017
Copy link
Copy link
Closed
Labels
A-clientArea: client.Area: client.B-breaking-changeBlocked: this is an "API breaking change".Blocked: this is an "API breaking change".C-featureCategory: feature. This is adding a new feature.Category: feature. This is adding a new feature.E-hardEffort: hard. Likely requires a deeper understanding of how hyper's internals work.Effort: hard. Likely requires a deeper understanding of how hyper's internals work.
Milestone
Description
This likely needs to be done before 1.0, because I suspect it involves adding a generic to a few types. But it's likely too late to fit into RC1.
The client code currently spawns a couple tasks for a connection, but does so by requiring the Executor<Box<dyn Future + Send>>, so we can spawn multiple. We can't make the internal type public, but we need to propagate the Send bounds of the IO and body types. So, we should change it to have bounds similar to the server::conn::http2, essentially an extension trait that means E: Executor<InternalFutureType<IO, B>>.
A way we can tell this all works is that we should be able to augment the single-threaded example file with a client as well.
Other relevant issues: #2341
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-clientArea: client.Area: client.B-breaking-changeBlocked: this is an "API breaking change".Blocked: this is an "API breaking change".C-featureCategory: feature. This is adding a new feature.Category: feature. This is adding a new feature.E-hardEffort: hard. Likely requires a deeper understanding of how hyper's internals work.Effort: hard. Likely requires a deeper understanding of how hyper's internals work.