Uneventful
    Preparing search index...
    • Create an activity that throws a TimeoutError once a timeout is reached

      e.g. starting(someStartable, timeoutAfter(2000, "whoops!")).task() will create a task that terminates with a new TimeoutError("whoops!") if someStartable doesn't complete in under 2 seconds.

      Or, to asyncThrow from inside a task, just start(timeoutAfter(...)) in the task's body, or work.exec(timeoutAfter(...)). (If you need a resettable deadline, use watchdog() instead.)

      Parameters

      • ms: number
      • message: string = "Timeout reached"

      Returns () => Coroutine<never>