actix / actix/actix-web

`HttpServer::new` should support asynchronous application factories

未关闭
#2,668 1 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
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 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。