@vgerbot/async
    Preparing search index...

    Class BaseTaskExecutorAbstract

    Base class for task executors with two lifecycle controls:

    • cancel(...) for task cancellation (executor remains usable)
    • shutdown(...) for permanent executor shutdown

    Subclasses should:

    1. Call checkShutdown() at the start of exec()
    2. Implement onCancelAll(reason) to cancel queued/running tasks
    3. Optionally extend onShutdown(reason) for permanent cleanup

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Methods

    • Checks if the executor is shut down and throws ExecutorShutdownError if so. Subclasses should call this at the start of exec().

      Parameters

      • message: string = "Executor permanently shut down"

        Optional custom error message

      Returns void

      if the executor is shut down

    • Hook for subclasses to cancel current and queued tasks. Called whenever cancel() without filters is invoked.

      Parameters

      • Optionalreason: unknown

      Returns void

    • Hook for subclasses to perform permanent shutdown cleanup. Default behavior first cancels all tasks. Subclasses can extend this to stop internal workers/timers.

      Parameters

      • Optionalreason: unknown

        The shutdown reason

      Returns void