pyo3
pyo3 copied to clipboard
GIL-free references to Python data
In comment to Py<PyBytes>::as_bytes:
I think there's a few other immutable types like str and tuple which I guess can also have treatment like this where py is necessary for reading, but once read, the GIL can be released. Might be interesting to follow up this another time.
Originally posted by @davidhewitt in https://github.com/PyO3/pyo3/pull/2235#pullrequestreview-915041031