`HttpServer::new` should support asynchronous application factories
Offen
RFC / Proposal
- Vorherrschende Sprache
- Rust
- Sterne
- 24.8k
- Forks
- 1.9k
- Ø Merge
- 23 Std. 10 Min.
- Gemergte PRs (30 T.)
- 26
Beschreibung
## Expected Behavior
`HttpServer::new` should support asynchronous application factories as the argument.
## Current Behavior
```rust
HttpServer::new(move || async move { ... });
```
fails.
## Possible Solution
We either add `new_async` method or somehow make `new` work for both sync and async (if possible).
## Context
I tried to allocate a thread object whose allocator uses an async method. It failed and now I don't know what to do.
## Your Environment
- Rust Version: 1.58.1
- Actix Web Version: 4.0.0-rc.1
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.