(request: Request, task: Task)
| 2534 | } |
| 2535 | |
| 2536 | function pingTask(request: Request, task: Task): void { |
| 2537 | if ( |
| 2538 | enableProfilerTimer && |
| 2539 | (enableComponentPerformanceTrack || enableAsyncDebugInfo) |
| 2540 | ) { |
| 2541 | // If this was async we need to emit the time when it completes. |
| 2542 | task.timed = true; |
| 2543 | } |
| 2544 | const pingedTasks = request.pingedTasks; |
| 2545 | pingedTasks.push(task); |
| 2546 | if (pingedTasks.length === 1) { |
| 2547 | request.flushScheduled = request.destination !== null; |
| 2548 | if (request.type === PRERENDER || request.status === OPENING) { |
| 2549 | scheduleMicrotask(() => performWork(request)); |
| 2550 | } else { |
| 2551 | scheduleWork(() => performWork(request)); |
| 2552 | } |
| 2553 | } |
| 2554 | } |
| 2555 | |
| 2556 | function createTask( |
| 2557 | request: Request, |
no test coverage detected