mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-29 08:32:02 +00:00
Increasing timeout in test_gil_scoped.py to get AppVeyor to succeed
This commit is contained in:
parent
0ca6867e8e
commit
085a29436a
@ -4,13 +4,13 @@ from pybind11_tests import gil_scoped as m
|
|||||||
|
|
||||||
|
|
||||||
def _run_in_process(target, *args, **kwargs):
|
def _run_in_process(target, *args, **kwargs):
|
||||||
"""Runs target in process and returns its exitcode after 1s (None if still alive)."""
|
"""Runs target in process and returns its exitcode after 10s (None if still alive)."""
|
||||||
process = multiprocessing.Process(target=target, args=args, kwargs=kwargs)
|
process = multiprocessing.Process(target=target, args=args, kwargs=kwargs)
|
||||||
process.daemon = True
|
process.daemon = True
|
||||||
try:
|
try:
|
||||||
process.start()
|
process.start()
|
||||||
# Do not need to wait much, 1s should be more than enough.
|
# Do not need to wait much, 10s should be more than enough.
|
||||||
process.join(timeout=1)
|
process.join(timeout=10)
|
||||||
return process.exitcode
|
return process.exitcode
|
||||||
finally:
|
finally:
|
||||||
if process.is_alive():
|
if process.is_alive():
|
||||||
|
Loading…
Reference in New Issue
Block a user