1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-08-22 13:15:07 +02:00

use actix deps instead of tokio

This commit is contained in:
Nikolay Kim
2019-11-26 08:26:22 +06:00
parent 5efac449b1
commit 52d03fa18c
23 changed files with 44 additions and 57 deletions

View File

@@ -174,7 +174,7 @@ where
let task = self.task.clone();
let fut = self.service.call(request);
tokio_executor::current_thread::spawn(async move {
actix_rt::spawn(async move {
let res = fut.await;
task.wake();
let _ = tx1.send(res);
@@ -252,7 +252,7 @@ mod tests {
let _ = lazy(|cx| srv.poll_ready(cx)).await;
// dispatcher do this
tokio_timer::delay_for(Duration::from_millis(100)).await;
actix_rt::time::delay_for(Duration::from_millis(100)).await;
let _ = lazy(|cx| srv.poll_ready(cx)).await;
assert_eq!(res1.await.unwrap(), 1);