[Python-checkins] cpython: Issue #15599: FreeBSD on KVM cannot handle a very low switch interval.

stefan.krah python-checkins at python.org
Wed Sep 12 21:37:55 CEST 2012


http://hg.python.org/cpython/rev/9b40d018e4cf
changeset:   79018:9b40d018e4cf
user:        Stefan Krah <skrah at bytereef.org>
date:        Wed Sep 12 21:30:09 2012 +0200
summary:
  Issue #15599: FreeBSD on KVM cannot handle a very low switch interval.

files:
  Lib/test/test_threaded_import.py |  4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_threaded_import.py b/Lib/test/test_threaded_import.py
--- a/Lib/test/test_threaded_import.py
+++ b/Lib/test/test_threaded_import.py
@@ -225,9 +225,11 @@
 @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:

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list