summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2012-09-12 19:30:09 (GMT)
committerStefan Krah <skrah@bytereef.org>2012-09-12 19:30:09 (GMT)
commit0b90d66342469f7969d6e0cc3e5926cffaf566c5 (patch)
treebd709e60a6a02154d2554c14ee8f83914cef4d80
parentd89774e1581ad2ca03ba06876d0fe4f2a2d8ff91 (diff)
downloadcpython-0b90d66342469f7969d6e0cc3e5926cffaf566c5.zip
cpython-0b90d66342469f7969d6e0cc3e5926cffaf566c5.tar.gz
cpython-0b90d66342469f7969d6e0cc3e5926cffaf566c5.tar.bz2
Issue #15599: FreeBSD on KVM cannot handle a very low switch interval.
-rw-r--r--Lib/test/test_threaded_import.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_threaded_import.py b/Lib/test/test_threaded_import.py
index cfc6842..4a5d7be 100644
--- a/Lib/test/test_threaded_import.py
+++ b/Lib/test/test_threaded_import.py
@@ -225,9 +225,11 @@ class ThreadedImportTests(unittest.TestCase):
@reap_threads
def test_main():
old_switchinterval = None
+ # Issue #15599: FreeBSD/KVM cannot handle gil_interval == 1.
+ new_switchinterval = 0.00001 if 'freebsd' in sys.platform else 0.00000001
try:
old_switchinterval = sys.getswitchinterval()
- sys.setswitchinterval(0.00000001)
+ sys.setswitchinterval(new_switchinterval)
except AttributeError:
pass
try: