bpo-31356: Add context manager to temporarily disable GC (GH-4224)

This commit is contained in:
Pablo Galindo 2018-01-29 20:37:09 +00:00 committed by Raymond Hettinger
parent 0cd6bca655
commit 72a0d218dc
5 changed files with 208 additions and 1 deletions

View file

@ -116,6 +116,7 @@ struct _gc_runtime_state {
int enabled;
int debug;
long disabled_threads;
/* linked lists of container objects */
struct gc_generation generations[NUM_GENERATIONS];
PyGC_Head *generation0;