mirror of
https://github.com/fafhrd91/actix-web
synced 2025-07-01 16:55:08 +02:00
remove actix-threadpool.use actix_rt::task::spawn_blocking (#1878)
This commit is contained in:
@ -280,5 +280,8 @@ where
|
||||
I: Send + 'static,
|
||||
E: Send + std::fmt::Debug + 'static,
|
||||
{
|
||||
actix_threadpool::run(f).await
|
||||
match actix_rt::task::spawn_blocking(f).await {
|
||||
Ok(res) => res.map_err(BlockingError::Error),
|
||||
Err(_) => Err(BlockingError::Canceled),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user