A Taste of JavaScript's New Parallel Primitives
You know, I&#x27;m not entirely sure how I feel about this. On the one hand: yeah, I get that having really multithreaded stuff is pretty handy, especially for certain computationally-bound tasks.<p>On the other hand, I quite like the single-threadedness of javascript. Promises-based systems (or async&#x2F;await) give us basically cooperative multitasking anyway to break up long-running (unresponsive) threads without worrying about mutexes and semaphores. I understand exactly when and where my javascript code will be interrupted, and I don&#x27;t need to wrap blocks in atomic operation markers extraneously.<p>I&#x27;ve written plenty multithreaded code, starting with old pthreads stuff and eventually moving on to Java (but my own experience with threaded stuff is limited mainly to C and Java), and it can be a <i>real pain</i>. I guess limiting shared memory to explicitly named blocks means you don&#x27;t have as much to worry about vis-a-vis nonreentrant code messing up your memory space.<p>That said, it is a pretty useful construct, and I see where this can benefit browser-based games dev in particular (graphics can be sped up a lot with multicore rendering, I bet).