Hacker News new | past | comments | ask | show | jobs | submit login

If it did not print 1 then you'd have a problem.

Not really a race condition, just the semantics of async. You'll get the same with goroutines, javascript async/await, and other constructs.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: