SchedulerPostTask.js — react Source File
Architecture documentation for SchedulerPostTask.js, a javascript file in the react codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 2e1e2710_805c_ab06_136c_76a96bbc358d["SchedulerPostTask.js"] 0c4003c2_7bcb_0f8f_2e9c_0802d60fa754["SchedulerPriorities.js"] 2e1e2710_805c_ab06_136c_76a96bbc358d --> 0c4003c2_7bcb_0f8f_2e9c_0802d60fa754 style 2e1e2710_805c_ab06_136c_76a96bbc358d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import type {PriorityLevel} from '../SchedulerPriorities';
declare class TaskController {
constructor(options?: {priority?: string}): TaskController;
signal: mixed;
abort(): void;
}
type PostTaskPriorityLevel = 'user-blocking' | 'user-visible' | 'background';
type CallbackNode = {
_controller: TaskController,
};
import {
ImmediatePriority,
UserBlockingPriority,
NormalPriority,
LowPriority,
IdlePriority,
} from '../SchedulerPriorities';
export {
ImmediatePriority as unstable_ImmediatePriority,
UserBlockingPriority as unstable_UserBlockingPriority,
NormalPriority as unstable_NormalPriority,
IdlePriority as unstable_IdlePriority,
LowPriority as unstable_LowPriority,
};
// Capture local references to native APIs, in case a polyfill overrides them.
const perf = window.performance;
const setTimeout = window.setTimeout;
// Use experimental Chrome Scheduler postTask API.
const scheduler = global.scheduler;
const getCurrentTime: () => DOMHighResTimeStamp = perf.now.bind(perf);
export const unstable_now = getCurrentTime;
// Scheduler periodically yields in case there is other work on the main
// thread, like user events. By default, it yields multiple times per frame.
// It does not attempt to align with frame boundaries, since most tasks don't
// need to be frame aligned; for those that do, use requestAnimationFrame.
const yieldInterval = 5;
let deadline = 0;
let currentPriorityLevel_DEPRECATED: PriorityLevel = NormalPriority;
// Always yield at the end of the frame.
// ... (179 more lines)
Domain
Subdomains
Classes
Dependencies
Source
Frequently Asked Questions
What does SchedulerPostTask.js do?
SchedulerPostTask.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Optimization subdomain.
What functions are defined in SchedulerPostTask.js?
SchedulerPostTask.js defines 2 function(s): unstable_requestPaint, unstable_shouldYield.
What does SchedulerPostTask.js depend on?
SchedulerPostTask.js imports 1 module(s): SchedulerPriorities.js.
Where is SchedulerPostTask.js in the architecture?
SchedulerPostTask.js is located at packages/scheduler/src/forks/SchedulerPostTask.js (domain: BabelCompiler, subdomain: Optimization, directory: packages/scheduler/src/forks).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free