Re:A Taste of JavaScript's New Parallel Primitives
by AgentME on Friday May 06, 2016 @05:13AM
(#11642638)
Unless you're using webworkers, then javascript runs in the UI thread. If you do blocking IO in the UI thread, then things freeze.
[ Parent
| on HN ]
Re:A Taste of JavaScript's New Parallel Primitives
by Lerc on Saturday May 07, 2016 @05:04PM
(#11651345)
That's the problem in a nutshell, It needn't be that way.
Blocking IO is just one aspect. Anything that is not instantaneous is blocking. Without the ability to preempt something taking a long time you will always be prone to the user interface freezing.
Methods like Array.map() are specifically designed to manage bulk operations immediately, which, without preemption, is at odds with a design where the user interface should perform with the lowest latency.