#cancellation-token #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

#202 in #token

MIT license

38KB
553 lines

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


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.

Dependencies

~350KB