#token #cancellation-token #smol-cancellation-token

smol-cancellation-token

A simple cancellation token implementation for Smol, copied from tokio-util’s cancellation token, and replace the waker with EventListener to make it cross async runtime compatible

1 unstable release

Uses new Rust 2024

0.1.0 Mar 11, 2025

#100 in #token

Download history 96/week @ 2025-03-09 19/week @ 2025-03-16

115 downloads per month

MIT license

38KB
553 lines

Smol Cancellation Token

A simple cancellation token implementation for Smol, copied from tokio-util's cancellation token, and replace the waker with EventListener to make it cross async runtime compatible.


lib.rs:

An asynchronously awaitable CancellationToken. The token allows to signal a cancellation request to one or more tasks.

Dependencies

~355KB