SetAbortTimeout
Namespace: Vercel.AI.Util
public static class SetAbortTimeoutSchedules an abort when a timeout elapses.
Inheritance: object
Methods
Section titled “Methods”Schedule(AbortController?, string?, int?, Action<Action, int>?)
Section titled “Schedule(AbortController?, string?, int?, Action<Action, int>?)”public static IDisposable? Schedule(AbortController? abortController, string? label, int? timeoutMs, Action<Action, int>? schedule = null)Aborts <code class=“paramref”>abortController</code> after <code class=“paramref”>timeoutMs</code> with a
TimeoutError whose message includes <code class=“paramref”>label</code>.
Returns null when the controller or timeout is missing. Disposing the result cancels the abort.
Parameters
| Name | Type | Description |
|---|---|---|
abortController |
AbortController | |
label |
string | |
timeoutMs |
int? | |
schedule |
Action<Action, int> |
Returns: IDisposable
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product