Issue #15599: Increase the switch interval. Several systems cannot handle

gil_interval == 1 in extreme situations.
This commit is contained in:
Stefan Krah 2012-10-01 23:21:45 +02:00
parent eb70be2b46
commit 219c7b90d0

View File

@ -225,11 +225,9 @@ 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(new_switchinterval)
sys.setswitchinterval(1e-5)
except AttributeError:
pass
try: