tea-control 0.1.0

Shared operation control primitives for tea-rs
Documentation
  • Coverage
  • 100%
    7 out of 7 items documented1 out of 7 items with examples
  • Size
  • Source code size: 24.29 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 370.73 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • tea-hq/tea-rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • nmgwddj

tea-control

Shared operation-control primitives for tea-rs.

CancellationScope is the project-owned cooperative cancellation tree used by model providers, tool executors, and runtime operations. It wraps Tokio-util internally while exposing no Tokio token, channel, task, or runtime handle.

use tea_control::CancellationScope;

let root = CancellationScope::new();
let child = root.child();
root.cancel();
assert!(child.is_cancelled());

Cancellation is idempotent. Parent cancellation propagates to children; child cancellation does not cancel its parent or siblings. Library code remains responsible for awaiting owned cleanup before reporting terminal cancellation.

This crate provides cancellation primitives only; it does not create a runtime or spawn tasks.