3 ms·
For the past 4 years, I've been working on a library that does exactly this — https://github.com/astoilkov/main-thread-scheduling https://github.com/astoilkov/m
by astoilkov 2y ago
For the past 4 years, I've been working on a library that does exactly this — https://github.com/astoilkov/main-thread-scheduling https://github.com/astoilkov/main-thread-scheduling.
It works in all browsers and it breaks long tasks. Sometimes it's even more powerful than scheduler.yield().
HN post: https://news.ycombinator.com/item?id=38864791 https://news.ycombinator.com/item?id=38864791.