Feature request: improve support for Tokio's local runtime and single-threaded servers
- Lingua principale
- Rust
- Stelle
- 24.8k
- Fork
- 1.9k
- Merge medio
- 23h 10m
- PR unite (30g)
- 26
Descrizione
I've got a simpler web server that is best run using a single-threaded runtime (it's a local server), and about the only thing standing between me and using `Rc` for some of my app state internals is the fact they aren't `!Send`, and `HttpServer::new` requires its closure to be `Send + Sync`.
Here's what I want:
- A single-threaded local-only variant of `HttpServer::new` that uses only one worker and uses `tokio::task::spawn_local` to spawn whatever helpers it may need.
- An `Rc`-backed version of `web::Data` and `web::ThinData`.
I may have missed other `Send`-requiring types as well - those would also be included in this.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.