logoalt Hacker News

Kinranyyesterday at 11:16 PM1 replyview on HN

And it doesn't actually prevent concurrency.


Replies

gf000yesterday at 11:29 PM

Sure, but concurrent != parallel. You can't have data races with a single thread of execution - a while loop writing i=0 or i=1 on each iteration is not a data race.

Two async functions doing so is not a data race either.

show 2 replies