Skip to content

Instantly share code, notes, and snippets.

@quad
Last active October 3, 2024 21:37
Show Gist options
  • Save quad/82caf7195e66bbe37a470d752ed83772 to your computer and use it in GitHub Desktop.
Save quad/82caf7195e66bbe37a470d752ed83772 to your computer and use it in GitHub Desktop.
A heterodox sketch of supervisor trees in Rust

cinch: supervisor trees for Rust

Constraints

  1. Intra-task concurrent, because the child tasks can opt-in to multi-task concurrency.

Types

pub trait Service {
    type Output;

    fn serve(&mut self) -> impl Future<Output = Self::Output>;
}

Problem Encountered

Matching -> impl Future with <F: Future>

Owning Future Lifetimes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment