Merge pull request #3690 from PyO3/check-signal-docs

Copy note on using check_signals on non-main thread/interpreter from Python docs.
This commit is contained in:
David Hewitt 2023-12-22 22:50:22 +00:00 committed by GitHub
commit 65f25d4133
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -906,6 +906,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<()> {