4 ms·
Yes, browsers already work this way today. For example in Chromium there's threads for GC, JS compilation, IO, image decoding, audio processing, video decoding
by esprehn 9y ago
Yes, browsers already work this way today.
For example in Chromium there's threads for GC, JS compilation, IO, image decoding, audio processing, video decoding, rastering, compositing, animations, indexeddb, and more. It also uses a thread pool and a task scheduler that handles prioritization both on the main thread (where the DOM is) and inside the thread pool. (ex. Handling touches is usually more important than handling xhr on the main thread).
Other browsers like Servo and Firefox Quantum use the thread pool for handling layout and style tasks as well.