[−][src]Struct futures::executor::LocalPool
A single-threaded task pool for polling futures to completion.
This executor allows you to multiplex any number of tasks onto a single thread. It's appropriate to poll strictly I/O-bound futures that do very little work in between I/O actions.
To get a handle to the pool that implements
Spawn
, use the
spawner()
method. Because the executor is
single-threaded, it supports a special form of task spawning for non-Send
futures, via spawn_local_obj
.
Methods
impl LocalPool
[src][−]
pub fn new() -> LocalPool
[src][+]
pub fn spawner(&self) -> LocalSpawner
[src][+]
pub fn run(&mut self)
[src][+]
pub fn run_until<F>(&mut self, future: F) -> <F as Future>::Output where
F: Future,
[src][+]
F: Future,
pub fn try_run_one(&mut self) -> bool
[src][+]
pub fn run_until_stalled(&mut self)
[src][+]
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src][+]
impl<T, U> Into for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T> Borrow for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,