This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bar.harel
Recipients YoSTEALTH, bar.harel, eric.snow, gregory.p.smith, josh.r, lisroach, ncoghlan, ned.deily, pablogsal, pitrou, pmpp, rhettinger, serhiy.storchaka, yselivanov
Date 2021-01-18.18:33:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1610994814.03.0.281579372721.issue31356@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-01-18 18:33:34bar.harelsetrecipients: + bar.harel, rhettinger, gregory.p.smith, ncoghlan, pitrou, ned.deily, pmpp, eric.snow, serhiy.storchaka, yselivanov, josh.r, YoSTEALTH, lisroach, pablogsal
2021-01-18 18:33:34bar.harelsetmessageid: <1610994814.03.0.281579372721.issue31356@roundup.psfhosted.org>
2021-01-18 18:33:34bar.harellinkissue31356 messages
2021-01-18 18:33:33bar.harelcreate