We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ef77af commit 04826f7Copy full SHA for 04826f7
Python/specialize.c
@@ -360,6 +360,10 @@ static void
360
maybe_enable_deferred_ref_count(PyObject *op)
361
{
362
if (!_Py_IsOwnedByCurrentThread(op)) {
363
+ // For module level variables that are heavily used from multiple
364
+ // threads, deferred reference counting provides good scaling
365
+ // benefits. The downside is that the object will only be deallocated
366
+ // by a GC run.
367
PyUnstable_Object_EnableDeferredRefcount(op);
368
}
369
0 commit comments