MCPcopy
hub / github.com/facebook/react / haltTask

Function haltTask

packages/react-server/src/ReactFlightServer.js:5831–5838  ·  view source on GitHub ↗
(task: Task, request: Request)

Source from the content-addressed store, hash-verified

5829}
5830
5831function haltTask(task: Task, request: Request): void {
5832 if (task.status !== PENDING) {
5833 // If this is already completed/errored we don't abort it.
5834 // If currently rendering it will be aborted by the render
5835 return;
5836 }
5837 task.status = ABORTED;
5838}
5839
5840function finishHaltedTask(task: Task, request: Request): void {
5841 if (task.status !== ABORTED) {

Callers 6

serializeThenableFunction · 0.85
abortStreamFunction · 0.85
abortIterableFunction · 0.85
abortBlobFunction · 0.85
retryTaskFunction · 0.85
abortFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected