From ecb0e9cb6116057d2f19246db8729d1fe7b0ccd9 Mon Sep 17 00:00:00 2001 From: Adam Reichold Date: Fri, 22 Dec 2023 12:08:37 +0100 Subject: [PATCH] Copy note on using check_signals on non-main thread/interpreter from Python docs. --- src/marker.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/marker.rs b/src/marker.rs index dfe876c8..9048259d 100644 --- a/src/marker.rs +++ b/src/marker.rs @@ -907,6 +907,9 @@ impl<'py> Python<'py> { /// As Python's [`signal`][2] API allows users to define custom signal handlers, calling this /// function allows arbitrary Python code inside signal handlers to run. /// + /// If the function is called from a non-main thread, or under a non-main Python interpreter, + /// it does nothing yet still returns `Ok(())`. + /// /// [1]: https://docs.python.org/3/c-api/exceptions.html?highlight=pyerr_checksignals#c.PyErr_CheckSignals /// [2]: https://docs.python.org/3/library/signal.html pub fn check_signals(self) -> PyResult<()> {