Closed
Description
PyType_AddWatcher
and PyType_ClearWatcher
are not thread safe as it modifies the interp's type watchers non-atomically.
PyType_AddWatcher
:
Lines 949 to 963 in d3f6063
PyType_ClearWatcher
:
Lines 980 to 989 in d3f6063
I think adding and removing of type watchers is a rare event so maybe instead of adding atomics or locks it would be better to change them to use stop-the-world pause event.