Bar Harel <bzvi7...@gmail.com> added the comment:

I've taken a shot making this in pure Python, and took into account a few more 
factors such as starvation and reentrancy.

As Nick said, one of the only ways it can truly work is if it's completely 
global, in which case we don't need to use the internal lock and relying on the 
GIL would work.

It's not very efficient atm, as the overhead of the Lock() and 
resulting python code probably offsets the benefit of disabling the GC, but it 
can be fine for some uses I guess.
 
https://github.com/bharel/disable_gc

I'll release it to pypi sometime soon and we can take a look at the 
not-so-accurate usage metric to see if such a thing is needed in the standard 
library.

----------
nosy:  -Dennis Sweeney

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

Reply via email to