diff --git a/galsim/config/util.py b/galsim/config/util.py index 90999c222a..b7909b359c 100644 --- a/galsim/config/util.py +++ b/galsim/config/util.py @@ -854,7 +854,7 @@ def worker(task_queue, results_queue, config, logger, initializers, initargs): logger.error("%s",traceback.format_exc()) # Clear any unclaimed jobs that are still in the queue while not task_queue.empty(): - task_queue.get() + task_queue.get(timeout=0.1) # And terminate any jobs that might still be running. for j in range(nproc): p_list[j].terminate() diff --git a/tests/test_config_output.py b/tests/test_config_output.py index b47c5b22f3..d84e80778d 100644 --- a/tests/test_config_output.py +++ b/tests/test_config_output.py @@ -1664,7 +1664,7 @@ def test_timeout(): # (PyPy doesn't seem to timeout, so skip this on PyPy.) if platform.python_implementation() != 'PyPy': config2 = galsim.config.CleanConfig(config2) - config2['output']['timeout'] = 0.001 + config2['output']['timeout'] = 0.0001 with CaptureLog() as cl: with assert_raises(galsim.GalSimError): galsim.config.Process(config2, logger=cl.logger)