| 120 | } |
| 121 | |
| 122 | void py_safe_run(const std::function<void(PyGILState_STATE gilState)>& f) |
| 123 | { |
| 124 | PyGILState_STATE gil_state = PyGILState_Ensure(); |
| 125 | f(gil_state); |
| 126 | PyGILState_Release(gil_state); |
| 127 | } |
| 128 | |
| 129 | } // namespace |
| 130 |
no outgoing calls
no test coverage detected