Replies: 2 comments 2 replies
-
Sorry for the slow reply. To be honest, this question is so high-level that it's really hard to give any concrete response. I don't see any reason why your proposed architecture wouldn't work, so I suggest you have a go and see how it works. Throughput might be limited by the GIL unless you can run on freethreaded Python 3.13, which we will release support for soon in 0.23. |
Beta Was this translation helpful? Give feedback.
-
I would strongly suggest using 0.22 and getting away from the "GIL Refs" of 0.19. The older API is less performant and does have internal state which is more likely to cause complexities. |
Beta Was this translation helpful? Give feedback.
-
I'm using PyO3 in a protocol lib interface to extend it used to Python, since it was developed in Rust. However, my main class in python currently uses multiprocess since it needs to start a server in one process, which makes one process keep locked in that thing. The other ones perform other kind of operations using shared references using an internal system done in rust.
From that, I have two questions:
I can provide a representative model of what we have right now. It looks something like that:
But our goal here is to make something like this:
Remove the IPCs, and use a single ref. But since we are dealing with multi threading in the python side and references in the backend, I need to know if I would have some problems with GIL or other internal state inside PyO3 crate. Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions