dillon1000/react
Commit
Browse files [Scheduler] Call postTask directly (#19551)
This updates the experimental Scheduler postTask build to call postTask directly, instead of managing our own custom queue and work loop. We still use a deadline 5ms mechanism to implement `shouldYield`. The main thing that postTask is currently missing is the continuation feature — when yielding to the main thread, the yielding task is sent to the back of the queue, instead of maintaining its position. While this would be nice to have, even without it, postTask may be good enough to replace our userspace implementation. We'll run some tests to see.
Changed paths11 files
First-parent comparison.eslintrc.js ModifiedA packages/scheduler/src/SchedulerPostTask.js AddedM packages/scheduler/src/__tests__/SchedulerPostTask-test.js ModifiedD packages/scheduler/src/forks/SchedulerHostConfig.post-task.js DeletedM packages/scheduler/unstable_post_task.js ModifiedM scripts/rollup/forks.js ModifiedM scripts/rollup/validate/eslintrc.cjs.js ModifiedM scripts/rollup/validate/eslintrc.cjs2015.js ModifiedM scripts/rollup/validate/eslintrc.fb.js ModifiedM scripts/rollup/validate/eslintrc.rn.js ModifiedM scripts/rollup/validate/eslintrc.umd.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…