Skip to content

Commit a621be3

Browse files
committed
nit
1 parent 2808df9 commit a621be3

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

Objects/dictobject.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8378,11 +8378,9 @@ frozendict_hash(PyObject *op)
83788378
}
83798379

83808380

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. */
8381+
/* Allocate an empty, GC-untracked frozendict. Staying untracked while it is
8382+
filled keeps a half-built frozendict out of gc.get_objects(), so another
8383+
thread can't observe it changing. Callers must GC-track it once fully built. */
83868384
static PyObject *
83878385
frozendict_new_untracked(PyTypeObject *type)
83888386
{

0 commit comments

Comments
 (0)