4 ms·
Expect deadlocks in web applications now? I wouldn't necessarily trust a JS programmer with a lock, sorry. They are hard enough in C++ or other languages that g
by yazzku 2y ago
Expect deadlocks in web applications now? I wouldn't necessarily trust a JS programmer with a lock, sorry. They are hard enough in C++ or other languages that generally require a lot more discipline.
- ukuina 2y ago> deadlocks only affect the locks themselves and code depending on them; the browser, other tabs, and other script in the page is not affected. Also, you don't need to use this API to lock up your web app.
- yazzku 2y agoI have a hard time picturing how an application can be considered anything other than completely broken once a couple threads/workers have deadlocked, so I don't know what any of that quote means. Yeah, I get that browsers isolate tabs and that the damage is contained.
- CGamesPlay 2y agoYou seem to be expecting these locks to block a thread, but they do not. A "deadlock" with these locks is simply a chunk of heap space holding a bunch of promises that will never resolve, occupying a few slots in the global event loop's select statement.
- 0x457 2y agoWell yes, but some part of code that supposed to run, never runs because of a deadlock.
- vendiddy 2y agoI wish they adopted more of an actor model to emulate concurrency. Or at least made it easier. I think I introducing locks is a mistake for the browser.