Expand description
Cooperative cancellation for long geometry operations.
§Why cooperative
GeomError::Cancelled existed in the error enum but nothing could produce
it: there was no way to ask for cancellation. The variant was aspirational,
and an aspirational cancellation contract is worse than none, because
callers plan around it.
This is a plain atomic flag, not an async runtime. Geometry providers are synchronous and CPU-bound; a token they poll costs one relaxed atomic load at whatever granularity they declare.
§Safety of cancellation
Cancellation is safe, never partial. A provider returns either a
complete result or GeomError::Cancelled. It must never return a
half-cut mesh, because a partial solid is indistinguishable from a valid
one downstream and corrupts every quantity derived from it.
Structs§
- Cancellation
Token - A shared cancellation flag.
Enums§
- Cancellation
Granularity - How finely a provider polls its cancellation token.