itasc.core.cancellation

Cooperative-cancellation primitive shared across ITASC pieces.

Long-running workers (segmentation, tracking, correction) poll a cancel callback and raise CancelledError when it returns True. The exception lives in itasc-core so the independently-installable pieces can share one cancellation type without depending on the segmentation stage.

Exceptions

CancelledError

Raised when a cooperative cancel signal is observed mid-computation.

exception itasc.core.cancellation.CancelledError[source]

Bases: Exception

Raised when a cooperative cancel signal is observed mid-computation.