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

Function abortTask

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

Source from the content-addressed store, hash-verified

5795}
5796
5797function abortTask(task: Task, request: Request, errorId: number): void {
5798 if (task.status !== PENDING) {
5799 // If this is already completed/errored we don't abort it.
5800 // If currently rendering it will be aborted by the render
5801 return;
5802 }
5803 task.status = ABORTED;
5804}
5805
5806function finishAbortedTask(
5807 task: Task,

Callers 3

serializeThenableFunction · 0.70
retryTaskFunction · 0.70
abortFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected