Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7c20ad32
Commit
7c20ad32
authored
Jul 02, 2011
by
Charles-François Natali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #12352: In test_free_from_gc(), restore the GC thresholds even if the GC
wasn't enabled at first.
parent
414d0fae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
Lib/test/test_multiprocessing.py
Lib/test/test_multiprocessing.py
+3
-4
No files found.
Lib/test/test_multiprocessing.py
View file @
7c20ad32
...
...
@@ -1640,12 +1640,11 @@ class _TestHeap(BaseTestCase):
# Make sure the GC is enabled, and set lower collection thresholds to
# make collections more frequent (and increase the probability of
# deadlock).
if
gc
.
isenabled
():
thresholds
=
gc
.
get_threshold
()
self
.
addCleanup
(
gc
.
set_threshold
,
*
thresholds
)
else
:
if
not
gc
.
isenabled
():
gc
.
enable
()
self
.
addCleanup
(
gc
.
disable
)
thresholds
=
gc
.
get_threshold
()
self
.
addCleanup
(
gc
.
set_threshold
,
*
thresholds
)
gc
.
set_threshold
(
10
)
# perform numerous block allocations, with cyclic references to make
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment