Theia API Documentation v1.65.0
    Preparing search index...

    The TaskManager is the common component responsible for managing running tasks.

    Implements

    Index

    Constructors

    Properties

    deleteEmitter: Emitter<number> = ...

    Emit when a registered task is deleted.

    id: number = -1

    each task has this unique task id, for this back-end

    logger: ILogger
    tasks: Map<number, Task> = ...

    contains all running tasks

    tasksPerCtx: Map<string, Task[]> = ...

    contains running tasks per context

    Accessors

    Methods

    • Returns all running tasks. If a context is provided, filter-down to only tasks started from that context.

      Parameters

      • Optionalctx: string

        the task execution context.

      Returns undefined | Task[]

      all running tasks for the given context or undefined if no tasks are registered for the given context.

    • Registers a new task (in the given context if present). Each registered task is considered to be currently running.

      Parameters

      • task: Task

        the new task.

      • Optionalctx: string

        the provided context.

      Returns number

      the registration id for the given task.