From f7ebda8ce3f736d5ba335a516fd9b7bdf1b50823 Mon Sep 17 00:00:00 2001 From: David Hewitt <1939362+davidhewitt@users.noreply.github.com> Date: Sun, 21 Aug 2022 16:26:33 +0100 Subject: [PATCH] docs: note with_gil auto-creates thread state --- src/marker.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/marker.rs b/src/marker.rs index 7540b615..494814b1 100644 --- a/src/marker.rs +++ b/src/marker.rs @@ -288,6 +288,10 @@ impl Python<'_> { #[cfg_attr(PyPy, doc = "`prepare_freethreaded_python`")] /// for details. /// + /// If the current thread does not yet have a Python "thread state" associated with it, + /// a new one will be automatically created before `F` is executed and destroyed after `F` + /// completes. + /// /// # Panics /// /// - If the [`auto-initialize`] feature is not enabled and the Python interpreter is not