CancelEvent

The cancellation primitive for sync calls: set the event to cancel.

Type alias in sponsorkit.client.

from sponsorkit import CancelEvent

Also importable from sponsorkit.client.

CancelEvent = threading.Event

The cancellation primitive for sync calls: set the event to cancel.

Async methods also accept an asyncio.Event, and cancelling the awaiting task cancels the work too.