MCPcopy Create free account
hub / github.com/pybind/pybind11 / test_gil

Function test_gil

tests/test_virtual_functions.cpp:190–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188};
189
190static void test_gil() {
191 {
192 py::gil_scoped_acquire lock;
193 py::print("1st lock acquired");
194 }
195
196 {
197 py::gil_scoped_acquire lock;
198 py::print("2nd lock acquired");
199 }
200}
201
202static void test_gil_from_thread() {
203 py::gil_scoped_release release;

Callers

nothing calls this directly

Calls 1

printFunction · 0.85

Tested by

no test coverage detected