diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2021-01-02 10:15:39 +0100 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2021-01-02 10:15:39 +0100 |
commit | e76cdab6dd77bad411e6ac9372ee527aff89ef17 (patch) | |
tree | e9868f05cf455336d75f33b1312d71034f8fb334 /3rdparty/pybind11/tests/test_gil_scoped.py | |
parent | c6cdf30501dcb2da01361229dd66a05dad73a132 (diff) | |
download | nextpnr-e76cdab6dd77bad411e6ac9372ee527aff89ef17.tar.gz nextpnr-e76cdab6dd77bad411e6ac9372ee527aff89ef17.tar.bz2 nextpnr-e76cdab6dd77bad411e6ac9372ee527aff89ef17.zip |
Update pybind11 to version 2.6.1
Diffstat (limited to '3rdparty/pybind11/tests/test_gil_scoped.py')
-rw-r--r-- | 3rdparty/pybind11/tests/test_gil_scoped.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/3rdparty/pybind11/tests/test_gil_scoped.py b/3rdparty/pybind11/tests/test_gil_scoped.py index 1548337c..0a1d6274 100644 --- a/3rdparty/pybind11/tests/test_gil_scoped.py +++ b/3rdparty/pybind11/tests/test_gil_scoped.py @@ -1,5 +1,7 @@ +# -*- coding: utf-8 -*- import multiprocessing import threading + from pybind11_tests import gil_scoped as m @@ -19,6 +21,7 @@ def _run_in_process(target, *args, **kwargs): def _python_to_cpp_to_python(): """Calls different C++ functions that come back to Python.""" + class ExtendedVirtClass(m.VirtClass): def virtual_func(self): pass @@ -48,6 +51,7 @@ def _python_to_cpp_to_python_from_threads(num_threads, parallel=False): thread.join() +# TODO: FIXME, sometimes returns -11 (segfault) instead of 0 on macOS Python 3.9 def test_python_to_cpp_to_python_from_thread(): """Makes sure there is no GIL deadlock when running in a thread. @@ -56,6 +60,7 @@ def test_python_to_cpp_to_python_from_thread(): assert _run_in_process(_python_to_cpp_to_python_from_threads, 1) == 0 +# TODO: FIXME on macOS Python 3.9 def test_python_to_cpp_to_python_from_thread_multiple_parallel(): """Makes sure there is no GIL deadlock when running in a thread multiple times in parallel. @@ -64,14 +69,18 @@ def test_python_to_cpp_to_python_from_thread_multiple_parallel(): assert _run_in_process(_python_to_cpp_to_python_from_threads, 8, parallel=True) == 0 +# TODO: FIXME on macOS Python 3.9 def test_python_to_cpp_to_python_from_thread_multiple_sequential(): """Makes sure there is no GIL deadlock when running in a thread multiple times sequentially. It runs in a separate process to be able to stop and assert if it deadlocks. """ - assert _run_in_process(_python_to_cpp_to_python_from_threads, 8, parallel=False) == 0 + assert ( + _run_in_process(_python_to_cpp_to_python_from_threads, 8, parallel=False) == 0 + ) +# TODO: FIXME on macOS Python 3.9 def test_python_to_cpp_to_python_from_process(): """Makes sure there is no GIL deadlock when using processes. |