fusion-engineering / inline-python

Inline Python code directly in your Rust code
https://docs.rs/inline-python
BSD 2-Clause "Simplified" License
1.15k stars 37 forks source link

Make Context::add_wrapped_with_gil use set_with_gil #33

Closed amosonn closed 4 years ago

amosonn commented 4 years ago

When we already have a gil, we shouldn't capture another one (does this even work?)

m-ou-se commented 4 years ago

Thanks! Nicely spotted.

(The GIL is a recursive lock. So yes, it did already work, it's just slightly more efficient to not do that.)