AbortController
A native browser Web API that enables cancellable network requests by passing a signal object to fetch calls. It serves as the standard mechanism in modern web applications for managing the lifecycle of in-flight requests.
Timeline (last 90 days)
AbortController is a cancellation primitive built into browsers and Node.js (v15+); bound to fetch's signal option, it can immediately reject a pending request with an AbortError on timeout.
Promise.race only makes the outer layer return early while the underlying connection remains hanging, continuing to consume quota or the connection pool in subsequent requests, so it is less reliable than AbortController.
Implementing instant cancellation of LLM streaming responses requires an unbroken signal propagation chain: the client's AbortController.abort() triggers HTTP fetch teardown, the gateway detects the socket close via the server context and cancels the upstream request context, and the model inference runtime catches the disconnection, stops autoregressive generation, and releases the KV-cache.
useObject relies on AbortController to manage the request lifecycle.
AbortController is a native browser API that enables interruptible network requests by passing a signal to fetch requests.
Promise.all itself does not cancel other running Promises when one Promise fails; developers need to manually integrate AbortController.
All Facts (6)
AbortController is a cancellation primitive built into browsers and Node.js (v15+); bound to fetch's signal option, it can immediately reject a pending request with an AbortError on timeout.
50%UnverifiedPromise.race only makes the outer layer return early while the underlying connection remains hanging, continuing to consume quota or the connection pool in subsequent requests, so it is less reliable than AbortController.
50%UnverifiedImplementing instant cancellation of LLM streaming responses requires an unbroken signal propagation chain: the client's AbortController.abort() triggers HTTP fetch teardown, the gateway detects the socket close via the server context and cancels the upstream request context, and the model inference runtime catches the disconnection, stops autoregressive generation, and releases the KV-cache.
50%UnverifieduseObject relies on AbortController to manage the request lifecycle.
50%UnverifiedAbortController is a native browser API that enables interruptible network requests by passing a signal to fetch requests.
50%UnverifiedPromise.all itself does not cancel other running Promises when one Promise fails; developers need to manually integrate AbortController.
50%