News for hackers. Stuff that matters.
Re:V8 adds support for top-level await by Arelius on Tuesday September 24, 2019 @10:12PM (#21066898)
I mean the answer here is an async getBalance and setBalance is the incorrect way to do this, and a mutex won't solve that.

if balance is a javascript variable, access shouldn't be provided by async functions. In the case that mutex is a remote resource of some sort (file or network resource) a process local lock won't solve this for you either.

It seems to me that the lack of locks make forces software engineers to consider the nature of their data instead of just grabbing for the inappropriate os lock.

There are no comments on this comment yet.