GIL-free references to Python data
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.2k
- Forks
- 1k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 66
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Py::as_bytes comment and the referenced PyO3 pull request #2235. Investigate whether immutable str and tuple access can safely release the GIL after reading, and define the scope and acceptance criteria before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- backend, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100