PEP 805: Safe Parallel Python

Most aren’t safe with the GIL, like if self.attr is None: self.attr = initial_value() in this case, the race is present with the GIL, but it is much more likely in FT.
If the race manifests as a leak, or some other small effect, then the difference between the GIL build and FT could be running to completion vs not.

However, there are some cases where the GIL does prevent a race.

The “best” example I have found is this:

where (provided the keys are strings or other simple objects) the GIL prevents the race with __setitem__