introduce PriorityRuntimeExecutor
Summary: Changelog: [Internal]
the goal is to allow userland to pass down scheduler priorities to the CallInvoker.
in bridge, we currently have RuntimeSchedulerCallInvoker. though this supports priorities, we cannot reuse this as is because it is unbuffered. currently JS invocations in bridgeless are (mostly) buffered.
in bridgeless, we currently have BridgelessJSCallInvoker
in this change, i introduce a new function type, PriorityRuntimeExecutor, that in addition to the runtime callback, has a priority argument. i hook this up to the cxx infra where we will instead call scheduleTask with a priority rather than scheduleWork if we receive a priority from userland.
i also introduced a new API from the cxx ReactInstance, called getPriorityRuntimeExecutor, which will allow us to keep the current getBufferedRuntimeExecutor intact which will allow for a iterative migration, but also make sure that both of these APIs share the same buffer.
Differential Revision: D56455633
This pull request was exported from Phabricator. Differential Revision: D56455633