3 ms·
I didnt say race conditions are impossible in Nodejs. Just highlighted that good program engineering is enough to avoid it and programmers should do that in the
by piterrro 6y ago
I didnt say race conditions are impossible in Nodejs. Just highlighted that good program engineering is enough to avoid it and programmers should do that in the first place.
- aaomidi 6y agoSure but at the same time there is a reason synchronization primitives exist. Readability of code > everything else.
- piterrro 6y agoNodejs doesn't have synchronization primitives, just because you use Promise and assign it to variable "mutex" doesn't make it any more real
- deleted 6y ago[deleted]
- dboreham 6y agoIt would be better if I had the time today to refute this in detail, because it's important that others reading this thread know this assertion is false, but...it's false.
- cphoover 6y agoAgreed Over the past 10 years, I've done async code to coordinate lots of different concurrent tasks in JS, never once needed a the use of a mutex.