{"id":"haedrix/scheduler","name":"scheduler","scope":"haedrix","platform":"roblox","description":"Cooperative scheduling primitives used by React Luau.","version":"17.3.10","latest":"17.3.10","versions":["17.3.7-pre.1","17.3.7-pre.2","17.3.7","17.3.10-rc.2","17.3.10-rc.3","17.3.10-rc.4","17.3.10","17.3.10-rc.1"],"license":"MIT","licenseRating":"safe","licenseCaveats":["The package archive does not include its license text; the license is declared in its manifest metadata."],"licenseVerified":false,"dependencies":{"jsdotlua/luau-polyfill":{"version":"^1.2.7","alias":"LuauPolyfill"},"haedrix/react-globals":{"version":"^17.3.10","alias":"ReactGlobals"},"roblox/safe-flags":{"version":"^0.1.2","alias":"SafeFlags"},"haedrix/shared":{"version":"^17.3.10","alias":"Shared"}},"integrity":"55ce9d9913143c705928069df48c5b6105c4f6c447295d83a3224f0b10aa139a","likes":0,"downloads":0,"install":"forest install haedrix/scheduler","url":"https://forest.dev/p/roblox/haedrix/scheduler","files":"https://api.forest.dev/ai/package/roblox/haedrix/scheduler/files","readme":"# scheduler\r\nA Roblox Lua port of the `scheduler` package from React, which is used under the hood by the Fiber Reconciler logic.\r\n\r\nStatus: ✔️ Ported\r\n\r\nSource: https://github.com/facebook/react/tree/master/packages/scheduler\r\n\r\n---\r\n\r\n### ✏️ Notes\r\n* The upstream implementation of min-heap does not include tests. To validate the port, `src/__tests__/SchedulerMinHeap.spec.lua` was added\r\n* The scheduler contains two sets of tests\r\n\t* A small, basic set of tests using the real scheduler and mock timers.\r\n\t* A more thorough test suite that uses `MockSchedulerHostConfig.lua`, which mocks the entire HostConfig interface and provides functionality to manipulate it within tests.\r\n\r\n#### Profiling\r\n\r\n```\r\nsrc/SchedulerProfiling.js\r\nsrc/__tests__/SchedulerProfiling-test.js\r\n```\r\n\r\nProfiling logic used for debugging the Scheduler. Includes tests that produce flamegraphs of processed tasks. This functionality is gated behind the `enableProfiling` flag defined in `SchedulerFeatureFlags.js`. Additional functionality is gated behind the enableSchedulingProfiler flag in ReactFeatureFlags. When enabling the Scheduling Profiler, you'll need to plug in a table with a `mark` function to the `_G.performance` global, like this:\r\n```lua\r\n_G.performance = {\r\n\tmark = function(str)\r\n\t\tdebug.profileBegin(str)\r\n\t\tdebug.profileEnd(str)\r\n}\r\n```\r\n\r\nWe may customize this for deeper integration with the Roblox Studio profiler in the future, based on specific performance optimization workflow needs.\r\n\r\n\r\n### ❌ Excluded\r\n\r\n#### Post Task\r\n\r\n```\r\nunstable_post_task.js\r\nsrc/SchedulerPostTask.js\r\nsrc/__tests__/SchedulerPostTask-test.js\r\n```\r\n\r\nAn alternate implementation of the Scheduler interface based on the new postTask browser API. There are relatively recent commits to these files, as well, suggesting new or ongoing development. Since the underlying browser API isn't relevant to the Roblox environment, this logic has been excluded.\r\n","readmeTruncated":false}