[issue3710] Reference leak in thread._local

Antoine Pitrou report at bugs.python.org
Sat Aug 21 22:49:30 CEST 2010

Antoine Pitrou <pitrou at free.fr> added the comment:

> Of course, I'd be all for changing local_getattro/local_setattro
> to not need _ldict to make that guarantee! _ldict always *returns*
> the correct pointer; it would be nice to make use of that somehow.

Indeed. Therefore, perhaps we could break the problem in two:
- fix the reference leak by using the correct assignment idiom outlined earlier
- fix local_getattro / local_setattro to always use the proper dict, regardless of thread switches


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list