##// END OF EJS Templates
rust-pyo3: getting rust-cpython GIL handle from various PyO3 objects...
rust-pyo3: getting rust-cpython GIL handle from various PyO3 objects Depending on the caller context, we might have a `Python<'py>` around or any of the smart pointers that bear the GIL lifetime. Of course, all of these can give back a `Python<'py>` but it is worthwile to reduce the needed boilerplate. The trait just expresses that a lifetime is assumed to be outlived by the PyO3 GIL lifetime. It is marked as unsafe because that is just trusting the implementor. A first version of this was made of a safe trait with a `get_py()` method and the corresponding trivial implementations. We found it finally to be even more artificial, as it boils down to coding 4 functions doing and returning no real data, that we hope the compiler will optimize away.

File last commit:

r53299:6673cec8 default
r53425:1dd673c1 default
Show More
Cargo.toml
4 lines | 108 B | application/toml | TOMLLexer
[workspace]
members = ["hg-core", "hg-cpython", "hg-pyo3", "rhg"]
exclude = ["chg", "hgcli"]
resolver = "2"