4 ms·
It's harder to ignore the problem in Python, because reference counting turns every read into a write, incrementing and then decrementing the recount of the obj
by oconnor663 2y ago
It's harder to ignore the problem in Python, because reference counting turns every read into a write, incrementing and then decrementing the recount of the object you read. For example, calling "my_mutex.lock()" has already messed with the recount on my_mutex before any locking happens. If races between threads could corrupt those refcounts, there's no way you could code around that. Right now the GIL protects those refcounts, so without a GIL you need a big change to make them all atomic.
- William_BB 2y agoOh wow, I haven't thought about refcounts on mutexes