kcode-intelligence-cancellation 0.1.0

UUID operation registration and hierarchical cancellation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# API

`kcode-intelligence-cancellation` is a small in-process registry for UUID-named
operations. `OperationRegistry::register_request` reserves a request ID and may
bind it to a parent ID that is currently registered. It rejects duplicate IDs,
self-parenting, unavailable registry state, and parents that are not running.

The returned opaque `ActiveOperation` owns the registration. Its asynchronous
`cancelled` method completes after either the operation is cancelled directly
or its registered parent is cancelled. Dropping it removes its ID, allowing the
ID to be registered again. `OperationRegistry::cancel` returns `true` only when
a live registered operation received the direct cancellation signal.

`ActiveOperation::direct_cancellation_requested` is intentionally narrower: it
is a nonblocking probe of only the operation's direct signal. It does not report
parent cancellation and exists for callers whose buffered path already has that
specific polling contract.