Re:V8 adds support for top-level await
by nitely on Wednesday September 25, 2019 @01:45PM
(#21073172)
Even the original solution is a lot more complex than just checking some primitive value. A lock is still needed when doing concurrency on a single thread, which is the point I'm making anyway.
> Long story short: Your problem is with ordering, not locking.
> Long story short: Your problem is with ordering, not locking.
Look up the definition of a concurrency lock.