mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
adjust gc_collect for Jython
This commit is contained in:
parent
12409067c2
commit
bb66973afb
1 changed files with 3 additions and 1 deletions
|
@ -17,6 +17,7 @@ import unittest
|
||||||
import importlib
|
import importlib
|
||||||
import UserDict
|
import UserDict
|
||||||
import re
|
import re
|
||||||
|
import time
|
||||||
|
|
||||||
__all__ = ["Error", "TestFailed", "ResourceDenied", "import_module",
|
__all__ = ["Error", "TestFailed", "ResourceDenied", "import_module",
|
||||||
"verbose", "use_resources", "max_memuse", "record_original_stdout",
|
"verbose", "use_resources", "max_memuse", "record_original_stdout",
|
||||||
|
@ -791,6 +792,8 @@ def gc_collect():
|
||||||
objects to disappear.
|
objects to disappear.
|
||||||
"""
|
"""
|
||||||
gc.collect()
|
gc.collect()
|
||||||
|
if is_jython:
|
||||||
|
time.sleep(0.1)
|
||||||
gc.collect()
|
gc.collect()
|
||||||
gc.collect()
|
gc.collect()
|
||||||
|
|
||||||
|
@ -1080,7 +1083,6 @@ def threading_setup():
|
||||||
|
|
||||||
def threading_cleanup(nb_threads):
|
def threading_cleanup(nb_threads):
|
||||||
import thread
|
import thread
|
||||||
import time
|
|
||||||
|
|
||||||
_MAX_COUNT = 10
|
_MAX_COUNT = 10
|
||||||
for count in range(_MAX_COUNT):
|
for count in range(_MAX_COUNT):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue