#cancellation-token #async-runtime #waker #tokio-util #event-listener #smol

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

2 releases

0.1.1 Oct 4, 2025
0.1.0 Mar 11, 2025

#715 in Asynchronous

43 downloads per month
Used in trash_parallelism

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

~345KB