Alloc-only Future
executor
Assuming the RawMutex
implementation provided is sound, this should be
safe to use in both embedded and non-embedded scenarios. On embedded devices,
it will probably be a type that disables/re-enables interrupts. On real OS's,
it can be an actual mutex implementation.
The Sleep
implementation can be used to put the event loop into a low-power
state using something like cortex_m::wfi/e
.
Initialize a new AllocExecutor
Does nothing unless it's run()
Initialize a new AllocExecutor
with the given capacities.
Does nothing unless it's run()
Get a handle to a Spawner
that can be passed to Future
constructors
to spawn even more Future
s
Get a handle to a LocalSpawner
that can be passed to local Future
constructors
to spawn even more local Future
s
Spawn a local UnsafeFutureObj
into the executor.
Spawn a Future
into the executor.
This will implicitly box the future in order to objectify it.
Run the executor
Each loop will poll at most one task from the queue and then check for
newly spawned tasks. If there are no new tasks spawned and nothing left
in the queue, the executor will attempt to sleep.
Once there's nothing to spawn and nothing left in the registry, the
executor will return.
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)