Crates.io | switch-resume |
lib.rs | switch-resume |
version | 0.1.3 |
source | src |
created_at | 2023-08-30 23:28:23.554302 |
updated_at | 2023-10-18 14:31:28.03767 |
description | Delimited async continuations |
homepage | |
repository | https://github.com/kuviman/switch-resume |
max_upload_size | |
id | 959339 |
size | 40,103 |
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.