Hacker News new | ask | show | jobs
by vore 1231 days ago
In an async function, the only guarantee you have is that code between two await points is not interruptible. As you have more and more async operations, this guarantee gets pretty weak (if you have more than one pending async task and the current task yields, which one will run next?) and you have to start employing the usual locking mechanisms to ensure correctness.
1 comments

From experience, it is a strong enough guarantee to prevent many race conditions.