eon.cancel

Cooperative cancel for in-process jobs.

The token is polled before each job and before each in-process dispatch. A force-call inside a compiled relax still runs to the next poll. cancel_state sets the flag only while a batch is running, and the flag is cleared when that batch returns.

Module Contents

Classes

API

exception eon.cancel.Cancelled

Bases: Exception

Raised when a job sees a cancelled token.

Initialization

Initialize self. See help(type(self)) for accurate signature.

class eon.cancel.CancelToken

Initialization

cancel() → None
reset() → None
property cancelled: bool
raise_if_cancelled() → None