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 2808df9 commit a621be3Copy full SHA for a621be3
1 file changed
Objects/dictobject.c
@@ -8378,11 +8378,9 @@ frozendict_hash(PyObject *op)
8378
}
8379
8380
8381
-/* Allocate an empty, GC-untracked frozendict. Construction is kept untracked
8382
- so that, while user code (keys()/__getitem__) runs and the object is still
8383
- half-built, another thread cannot reach it via gc.get_objects() and observe
8384
- its length and contents changing. Callers must GC-track it once it is fully
8385
- built. */
+/* Allocate an empty, GC-untracked frozendict. Staying untracked while it is
+ filled keeps a half-built frozendict out of gc.get_objects(), so another
+ thread can't observe it changing. Callers must GC-track it once fully built. */
8386
static PyObject *
8387
frozendict_new_untracked(PyTypeObject *type)
8388
{
0 commit comments