Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

> What does "changing" mean exactly?

I'm not a GC expert. Maybe we should add a global flag that disable calling 
nontrivial destructors and set it in PyObject_GC_New(). The objects with 
nontrivial destructor should be added to the special queue and destroyed in 
"safe" place. There may be a problem with determining the "safe" place. I think 
that any Py_DECREF() is a "safe" place, and the eval loop is a "safe" place.

> What will be the effects on normal code?

I think this shouldn't affect Python code if perform deferred destroying in the 
eval loop. This can affect the execution of extensions if reference loops are 
created in C code. Some objects in loops can live longer that before.

> How do you know that it will not create new problems that didn't exist before?

I don't know. But we can try and see what is the result.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31165>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to