SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 0 C++

Add scheduleTask and runWorkLoop to public API (#48284)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48284

Changelog: [internal]

We recently prevented tasks that run via `runTask` to synchronously call `runTask` because the execution is synchronous and we can't nest tasks in the event loop (D67107664 / https://github.com/facebook/react-native/pull/48235).

This adds `scheduleTask` to schedule tasks (also within tasks) with the right expectations (the task will not run synchronously on that call but at the right time).

It also adds `runWorkLoop` so we can run scheduled tasks if they're not scheduled from an already running task.

Reviewed By: javache

Differential Revision: D67275518

fbshipit-source-id: acde0093802fbcb7083334f2c0247b37b759a6b1
R
Rubén Norte committed
358fd38825352e9d01f5d0cca08e5a5387a469a6
Parent: 5d67490
Committed by Facebook GitHub Bot <[email protected]> on 12/16/2024, 12:50:15 PM