Functions
test_gil_scoped Namespace Reference

Functions

def _python_to_cpp_to_python ()
 
def _python_to_cpp_to_python_from_threads (num_threads, parallel=False)
 
def _run_in_process (target, args, kwargs)
 
def test_cross_module_gil ()
 
def test_python_to_cpp_to_python_from_process ()
 
def test_python_to_cpp_to_python_from_thread ()
 
def test_python_to_cpp_to_python_from_thread_multiple_parallel ()
 
def test_python_to_cpp_to_python_from_thread_multiple_sequential ()
 

Function Documentation

◆ _python_to_cpp_to_python()

def test_gil_scoped._python_to_cpp_to_python ( )
private
Calls different C++ functions that come back to Python.

Definition at line 21 of file test_gil_scoped.py.

◆ _python_to_cpp_to_python_from_threads()

def test_gil_scoped._python_to_cpp_to_python_from_threads (   num_threads,
  parallel = False 
)
private
Calls different C++ functions that come back to Python, from Python threads.

Definition at line 38 of file test_gil_scoped.py.

◆ _run_in_process()

def test_gil_scoped._run_in_process (   target,
  args,
  kwargs 
)
private
Runs target in process and returns its exitcode after 10s (None if still alive).

Definition at line 7 of file test_gil_scoped.py.

◆ test_cross_module_gil()

def test_gil_scoped.test_cross_module_gil ( )
Makes sure that the GIL can be acquired by another module from a GIL-released state.

Definition at line 91 of file test_gil_scoped.py.

◆ test_python_to_cpp_to_python_from_process()

def test_gil_scoped.test_python_to_cpp_to_python_from_process ( )
Makes sure there is no GIL deadlock when using processes.

This test is for completion, but it was never an issue.

Definition at line 83 of file test_gil_scoped.py.

◆ test_python_to_cpp_to_python_from_thread()

def test_gil_scoped.test_python_to_cpp_to_python_from_thread ( )
Makes sure there is no GIL deadlock when running in a thread.

It runs in a separate process to be able to stop and assert if it deadlocks.

Definition at line 54 of file test_gil_scoped.py.

◆ test_python_to_cpp_to_python_from_thread_multiple_parallel()

def test_gil_scoped.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.

It runs in a separate process to be able to stop and assert if it deadlocks.

Definition at line 63 of file test_gil_scoped.py.

◆ test_python_to_cpp_to_python_from_thread_multiple_sequential()

def test_gil_scoped.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.

Definition at line 72 of file test_gil_scoped.py.



gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:47:31