Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IThreadPool

The thread pool is responsible for distributing the scheduled tasks onto different workers. The thread pool defines how the queued tasks are scheduled onto the available workers and how many workers are created.

Hierarchy

  • IThreadPool

Implemented by

Index

Properties

Methods

Properties

maxThreads

maxThreads: number

Maximum number of threads that the thread pool should scheduled. Default initialized with the number of the hardware concurrency supported by the hardware. The value cannot be negative or 0

Methods

run

  • Schedules the passed in task definition onto an available worker or enqueues the task to be scheduled as soon as a worker gets available.

    Type parameters

    • TResult

    Parameters

    Returns ITask<TResult>

Generated using TypeDoc