Crate microasync_rt
source ·Modules
MicroAsync-Util provides some AsyncIO for Files, TCP, and UDP. These are provided by the
ReadAsync and WriteAsync traits.
Macros
Structs
A future that runs a function in a new thread without blocking.
A future cosisting of multiple other futures. Ready once all of the inner futures are ready.
Owned wrapper for anything that implements InternalRuntime, used to add a Runtime impl.
A very small async runtime, with support for adding more tasks as it runs. This uses a VecDeque
internally.
Wrapper for anything that implements InternalRuntime, used to add a Runtime impl.
A future which returns Pending once, and returns Ready the next time it is polled. Used to
interrupt a running task to make space for others to run.
Traits
Trait to be implemented by async runtimes
Auto-trait with the methods that will actually be called by the users of the runtime.
Trait to construct a runtime
Functions
This clears the currently running runtime. MUST ONLY BE CALLED BY A RUNTIME WHEN IT WILL
(temporarily of permanently) STOP EXECUTING FUTURES. MUST FOLLOW A set_current_runtime CALL.
IF THE RUNTIME STARTS TO BE USED AGAIN, set_current_runtime MUST BE CALLED AGAIN.
Defers execution of a blocking function to another thread returning a DeferredFuture, which
does nothing until it is awaited.
This gets the currently running runtime. PANICS IF IT IS CALLED FROM OUTSIDE THE RUNTIME.
Joins multiple futures into one, which will be ready once all of the inner ones are. This is
effectively a small one-time-use runtime without the ability to add any tasks.
This sets the currently running runtime. MUST ONLY BE CALLED BY A RUNTIME WHEN IT IS ABOUT TO
START EXECUTING, AND MUST BE CLEARED AFTERWARDS.
Interrupts the current task and yields for the ohers. This uses a YieldFuture