Skip to content

Commit

Permalink
temp: future_into_py_iter perf on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
gi0baro committed Apr 15, 2024
1 parent a06b123 commit 1822e00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/asgi/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl ASGIHTTPProtocol {
let body_ref = self.request_body.clone();
let flow_ref = self.flow_rx_exhausted.clone();
let flow_hld = self.flow_tx_waiter.clone();
future_into_py_iter(self.rt.clone(), py, async move {
future_into_py_futlike(self.rt.clone(), py, async move {
let mut bodym = body_ref.lock().await;
let body = &mut *bodym;
let mut more_body = false;
Expand Down
2 changes: 1 addition & 1 deletion src/rsgi/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl RSGIHTTPProtocol {
impl RSGIHTTPProtocol {
fn __call__<'p>(&self, py: Python<'p>) -> PyResult<&'p PyAny> {
if let Some(body) = self.body.lock().unwrap().take() {
return future_into_py_iter(self.rt.clone(), py, async move {
return future_into_py_futlike(self.rt.clone(), py, async move {
let body = body
.collect()
.await
Expand Down

0 comments on commit 1822e00

Please sign in to comment.