3 ms·
You need locks in asyncio as well.
by the_mitsuhiko 10y ago
You need locks in asyncio as well.
- ddorian43 10y agoI know you do, but I asked for his implementation (which needed locks on threads but not on async)
- xapata 10y agoOnly if you have multiple threads/processes/coroutines sharing resources.
- DasIch 10y ago"Only"? You need locks in exactly the same scenarios as you do when you use multiple threads.
- xapata 10y agoGood 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.