GIL effect in Python extension #637
Unanswered
jacopoabramo
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there, I just recently found out about this project - amazing work. I haven't dug in it yet as I'm glacing the documentation a bit, but I have a question.
The documentation states that codon supports multithreading out of the box via OMP; it also states that it provides interoperability with CPython by building codon code as a Python C extension. Given this, what's the effect on the GIL on a Python extension compiled via codon? For example in a producer-consumer pattern, where pure Python is the producer and a codon thread is the consumer and data is shared via a - say - FIFO, is this scenario possible in the sense that the GIL releases the data transmitted from Python to codon allowing to have a true concurrent thread? What would be the best choice for the FIFO? Should it be a codon FIFO which is exposed in the Python code?
Beta Was this translation helpful? Give feedback.
All reactions