News for hackers. Stuff that matters.
Re:The Firefox UI Is Now Built with Web Components by pessimizer on Wednesday November 20, 2019 @01:49PM (#21587070)
Web 4.0 is the internet of race conditions. Thanks, javascript everywhere.
Re:The Firefox UI Is Now Built with Web Components by hombre_fatal on Wednesday November 20, 2019 @02:07PM (#21587279)
I don't get it. Javascript would have categorically improved on this compared to more traditional multi-threaded solutions.
Re:The Firefox UI Is Now Built with Web Components by GrayShade on Wednesday November 20, 2019 @03:34PM (#21588195)
You can still have race conditions in single-threaded async code.
Re:The Firefox UI Is Now Built with Web Components by cjones26 on Wednesday November 20, 2019 @04:04PM (#21588493)
Well I don't think that could technically be considered a race condition, as it's clearly a design problem in the code causing what would appear to be a "pseudo" race condition.
Re:The Firefox UI Is Now Built with Web Components by GrayShade on Wednesday November 20, 2019 @04:35PM (#21588812)
Why not? It is a race condition, just like TOCTTOU is a race condition that doesn't necessarily involve threads.

Note the difference between race conditions in general and data races that involve unsynchronized access to shared memory.

Re:The Firefox UI Is Now Built with Web Components by minitech on Thursday November 21, 2019 @01:39AM (#21591930)
And “Javascript would have categorically improved on this compared to more traditional multi-threaded solutions” remains true nevertheless.
Re:The Firefox UI Is Now Built with Web Components by cjones26 on Wednesday November 20, 2019 @04:03PM (#21588476)
What? JavaScript is a single threaded language...
Re:The Firefox UI Is Now Built with Web Components by Yoric on Wednesday November 20, 2019 @05:28PM (#21589300)
And despite this, I've encountered lots of race conditions in JavaScript, thanks to the magic of async programming. Harder to debug than multi-threaded ones, too.