We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c2c884 commit 5a3de05Copy full SHA for 5a3de05
newsfragments/5109.changed.md
@@ -0,0 +1 @@
1
+Add `#[track_caller]` to `with_gil` and `with_gil_unchecked`.
src/marker.rs
@@ -399,6 +399,7 @@ impl Python<'_> {
399
///
400
/// [`auto-initialize`]: https://pyo3.rs/main/features.html#auto-initialize
401
#[inline]
402
+ #[track_caller]
403
pub fn with_gil<F, R>(f: F) -> R
404
where
405
F: for<'py> FnOnce(Python<'py>) -> R,
@@ -433,6 +434,7 @@ impl Python<'_> {
433
434
435
/// Behavior in other scenarios is not documented.
436
437
438
pub unsafe fn with_gil_unchecked<F, R>(f: F) -> R
439
440
0 commit comments