Skip to main content
Contract threads close automatically at a terminal step. Close non-contract threads explicitly as completed or cancelled. Once closed, a thread cannot resume or accept additional steps. Its key remains bound to that thread; use a new key for a new execution.
Manual completion is rejected for contract-based threads unless a terminal step has been reached.

Basic Usage

Methods

Notifications

When a thread ends, Threadify emits events:
  • thread.completed - Triggered when complete() is called or a terminal step is reached
  • thread.cancelled - Triggered when cancel() is called