`HttpServer::new` should support asynchronous application factories
未关闭
RFC / Proposal
- 主要语言
- Rust
- 星标
- 24.8k
- 派生
- 1.9k
- 平均合并
- 23 小时 10 分钟
- 30 天内合并 PR
- 26
描述
## 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
贡献指南
评估
这个 Issue 还没有评估数据。