Pablo Galindo Salgado <pablog...@gmail.com> added the comment:

I have been playing with possible solutions for a while and the weak-reference 
solution seems not robust enough as there are too potential race conditions 
between the destruction of the weakreferences (the pool) and the handling code.

I would advocate again for using a strong reference. The reasons are:

* The rest of the stdlib is using this solution to link iterator objects and 
similar to their parents (lists, dicts, sets...etc all have strong references 
back to their parents).

* This solution is backwards compatible with the current behaviour.

* We have the new ResourceWarnigns to make clear that this behaviour is not 
supported.

----------

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

Reply via email to