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

You need locks in asyncio as well.



Only if you have multiple threads/processes/coroutines sharing resources.


"Only"? You need locks in exactly the same scenarios as you do when you use multiple threads.


Good point. I should have said that asyncio allows patterns that use fewer shared resources.

Actually... I take that back. Asyncio is solving a different problem than the locking of shared resources.


I know you do, but I asked for his implementation (which needed locks on threads but not on async)




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: