by amelius · 11y ago · 0 comments
I think what we need is immutable data-structures to be shareable between threads. This approach should also allow structural sharing between threads, allowing for efficient and safe data structures.
Also, I could see a use for a mechanism where a thread creates a data-structure, then marks it as read-only, such that it can become shared.
The solution to that being parallel or async paint/layout, which is something I never hear mentioned (probably because it's a really hard problem).
1: http://en.wikipedia.org/wiki/Servo_(layout_engine) 2: http://pcwalton.github.io/blog/2014/02/25/revamped-parallel-...
All that this does is make algorithms running inside Workers faster. It doesn't unblock UIs, since Workers already do that if you're willing to accept copying. If copying back and forth from the main UI thread is too slow, this proposal won't change that.
https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers...