News for hackers. Stuff that matters.
Re:JavaScript in Parallel: Web Workers and SharedArrayBuffer by baddox on Sunday March 05, 2017 @01:03PM (#13797340)
You can definitely block the main thread. XHR requests can be run synchronously by calling .open() with false as the third argument. And when you do asynchronous XHR requests, the browser can and will run multiple requests in parallel. Of course, the callbacks just get added to the event queue and run one at a time to completion on the main thread. And granted, it's hard to call this an "optimization opportunity," since you should almost never make synchronous XHR requests anyway.
Re:JavaScript in Parallel: Web Workers and SharedArrayBuffer by Waterluvian on Sunday March 05, 2017 @07:14PM (#13799761)
True. But I'd call synchronous XHR a legacy item that you should probably never use.