Struct async_executors::exec::GlommioCt [−][src]
pub struct GlommioCt { /* fields omitted */ }
glommio
only.Expand description
Single threaded glommio executor. This executor works on Linux 5.8+ only.
You will probably need to augment your rlimit_memlock. See glommio documentation for details.
This always has io_uring enabled and will pull in quite some dependencies including liburing from C.
Glommio has some specific behavior. It will always poll spawned tasks immediately, so a spawned task will pre-empt the currently running task until it’s first await.
When it comes to YieldNow, glommio does not yield unless the task has been running for
some time. The glommio method is actually called yield_if_needed
.
Panics
Calling spawn from outside block_on
will panic.
Implementations
Create an executor. Note: in order to spawn you need to run block_on
.
Trait Implementations
fn spawn_handle_local_obj(
&self,
future: LocalFutureObj<'static, Out>
) -> Result<JoinHandle<Out>, SpawnError>
fn spawn_handle_local_obj(
&self,
future: LocalFutureObj<'static, Out>
) -> Result<JoinHandle<Out>, SpawnError>
Spawn a future and return a JoinHandle
that can be awaited for the output of the future.
fn spawn_handle_obj(
&self,
future: FutureObj<'static, Out>
) -> Result<JoinHandle<Out>, SpawnError>
fn spawn_handle_obj(
&self,
future: FutureObj<'static, Out>
) -> Result<JoinHandle<Out>, SpawnError>
Spawn a future and return a JoinHandle
that can be awaited for the output of the future.
fn yield_now(&self) -> YieldNowFutⓘNotable traits for YieldNowFutimpl Future for YieldNowFut type Output = ();
fn yield_now(&self) -> YieldNowFutⓘNotable traits for YieldNowFutimpl Future for YieldNowFut type Output = ();
impl Future for YieldNowFut type Output = ();
Await this future in order to yield to the executor.
Auto Trait Implementations
impl !RefUnwindSafe for GlommioCt
impl !UnwindSafe for GlommioCt
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn spawn_local<Fut>(&self, future: Fut) -> Result<(), SpawnError> where
Fut: 'static + Future<Output = ()>,
fn spawn_local<Fut>(&self, future: Fut) -> Result<(), SpawnError> where
Fut: 'static + Future<Output = ()>,
Spawns a task that polls the given future with output ()
to
completion. Read more
fn spawn_local_with_handle<Fut>(
&self,
future: Fut
) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError> where
Fut: 'static + Future,
fn spawn_local_with_handle<Fut>(
&self,
future: Fut
) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError> where
Fut: 'static + Future,
Spawns a task that polls the given future to completion and returns a future that resolves to the spawned future’s output. Read more
Spawns a task that polls the given future with output ()
to
completion. Read more
fn spawn_with_handle<Fut>(
&self,
future: Fut
) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError> where
Fut: 'static + Future + Send,
<Fut as Future>::Output: Send,
fn spawn_with_handle<Fut>(
&self,
future: Fut
) -> Result<RemoteHandle<<Fut as Future>::Output>, SpawnError> where
Fut: 'static + Future + Send,
<Fut as Future>::Output: Send,
Spawns a task that polls the given future to completion and returns a future that resolves to the spawned future’s output. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more