Skip to content

Commit ecb0e9c

Browse files
adamreicholddavidhewitt
authored andcommitted
Copy note on using check_signals on non-main thread/interpreter from Python docs.
1 parent b842711 commit ecb0e9c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/marker.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,9 @@ impl<'py> Python<'py> {
907907
/// As Python's [`signal`][2] API allows users to define custom signal handlers, calling this
908908
/// function allows arbitrary Python code inside signal handlers to run.
909909
///
910+
/// If the function is called from a non-main thread, or under a non-main Python interpreter,
911+
/// it does nothing yet still returns `Ok(())`.
912+
///
910913
/// [1]: https://docs.python.org/3/c-api/exceptions.html?highlight=pyerr_checksignals#c.PyErr_CheckSignals
911914
/// [2]: https://docs.python.org/3/library/signal.html
912915
pub fn check_signals(self) -> PyResult<()> {

0 commit comments

Comments
 (0)