Adam Reichold

Results 536 comments of Adam Reichold

Somewhat off-topic for subinterpreters, I guess `GILProtected` and `GILOnceCell` could become something like "interpreter-local storage" in analogy to TLS? As for nogil, I suspect we'll want to provide a sort...

> if the belief wasn't that the single thread efficiency losses are minimal, This is going off the rails where do we find the space to discuss this stuff? I...

> The only downside I can see about this is that it brings a whole new set of thread locals into play, for the worker thread. I think there are...

(Will take care of the MSRV build separately... Uff.)

> Indeed. I think we should certainly document this and of course, what I would really want to have from the Rust standard library here would be a function like...

This is not really a surprise, but the overhead of `allow_threads` itself does increase by two orders of magnitude due to this change: ```console allow_threads time: [5.3486 µs 5.3774 µs...

> > I would prefer to not trying to call back and forth, mainly to keep with_gil simple, performant and more explainable. Hence, I would indeed work this into the...

@cjrh @GodTamIt @wallies `tantivy-py` has a call to `allow_threads` in its [`search` method](https://github.com/quickwit-oss/tantivy-py/blob/539129154160e850d3e7d9a8ec5bc358b9b121d7/src/searcher.rs#L166). Does one of you have a use case and the spare time to test `tantivy-py`'s main branch...

> I think the main reason would be python thread locals and contextvars, which I think are tied to a python thread state. If that is the case, then I...

> I think I agree with you on this, I think in practice being able to nest is very likely and also hard to prevent. Ok, let's leave `with_gil` alone...