Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Leverage scheduler.yield in splitTask when available (WordPress#66001)
* Leverage scheduler.yield in splitTask when available * Eliminate extra Promise when using scheduler.yield() Co-authored-by: swissspidy <swissspidy@git.wordpress.org> * Avoid needlessly re-checking whether scheduler.yield() is defined * Remove needless function wrapper * Ensure that scheduler is context object to yield function * Remove needless async * Reduce verbosity of scheduler.yield() existence check * Fix return type for scheduler.yield() Co-authored-by: Brendan Kenny <bckenny@gmail.com> * Define scheduler and scheduler.yield as optional Co-authored-by: Brendan Kenny <bckenny@gmail.com> --------- Unlinked contributors: brendankenny, LeszekSwirski. Co-authored-by: felixarntz <flixos90@git.wordpress.org>
- Loading branch information