1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-06-28 02:59:01 +02:00

remove RUNNING Q PENDING thread locals from actix-rt (#207)

This commit is contained in:
fakeshadow
2020-12-27 07:26:02 +08:00
committed by GitHub
parent 43ce25cda1
commit 518bf3f6a6
10 changed files with 273 additions and 274 deletions

View File

@ -30,6 +30,10 @@ impl Runtime {
})
}
pub(super) fn local(&self) -> &LocalSet {
&self.local
}
/// Spawn a future onto the single-threaded runtime.
///
/// See [module level][mod] documentation for more details.
@ -84,7 +88,7 @@ impl Runtime {
/// complete execution by calling `block_on` or `run`.
pub fn block_on<F>(&mut self, f: F) -> F::Output
where
F: Future + 'static,
F: Future,
{
self.local.block_on(&mut self.rt, f)
}