▲ | frollogaston 4 days ago | |||||||||||||||||||||||||||||||||||||||||||||||||
It's true that JS await is kinda like releasing a lock, but otherwise, you'd just use a mutex whenever you access shared state. Which is rare as you said, and also easy to enforce in various langs nowadays. | ||||||||||||||||||||||||||||||||||||||||||||||||||
▲ | kentonv 4 days ago | parent [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
I said that shared state between connections is rare, but shared state within a connection is extremely common. And there are still multiple concurrent things going on within that connection context, requiring some concurrency mechanism. Locking mutexes everywhere sounds like a nightmare to me. | ||||||||||||||||||||||||||||||||||||||||||||||||||
|