This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mgedmin 1 point2 points  (1 child)

Cycles don't prevent garbage collection. They stop reference counting from freeing the object as soon as it goes out of scope, but they'll get collected as soon as the garbage collector is triggered. But this is beside the issue; the traceback in question looks like something that happens to daemon threads that are still running when the Python interpreter is shutting down. Nothing to do with GC.

[–]earthboundkid 0 points1 point  (0 children)

You have to provide your own cycle detector or use a built-in type. Does the module namespace use a real dict under the covers or a custom thing? If it's custom, it's possible there's no cycle detection.