Function runInThread

  • Runs a function in a thread

    Type Parameters

    • T

    Parameters

    • fn: (() => T)

      The function to run in a thread

        • (): T
        • Returns T

    Returns Promise<T>