pub fn monarch_with_gil_blocking<F, R>(f: F) -> RExpand description
Blocking wrapper around Python::with_gil for use in synchronous contexts.
Unlike monarch_with_gil, this function does NOT use the GIL_LOCK async mutex.
Since it is blocking call, it simply acquires the GIL and releases it when the
closure returns.
§Example
ⓘ
let result = monarch_with_gil_blocking(|py| {
// Do work with Python GIL
Ok(42)
})?;