4 releases
0.1.3 | Oct 18, 2023 |
---|---|
0.1.2 | Sep 9, 2023 |
0.1.1 | Aug 31, 2023 |
0.1.0 | Aug 30, 2023 |
#1953 in Asynchronous
131 downloads per month
Used in 4 crates
(via geng-async-state)
13KB
54 lines
switch-resume
This crates provides functionality for running switchable tasks (futures).
Switching is a control flow mechanism that pauses normal execution of current task, captures current continuation and passes it as an argument to the provided async fn. The task then proceeds by evaluating that fn, instead of resuming normally.
In order to resume normal execution, the passed resumption object can be called explicitly.
This is an implementation of delimited continuations in Rust using async that works on stable.
lib.rs
:
Examples
Dependencies
~1.6–2.4MB
~45K SLoC