Replies: 2 comments 1 reply
-
for Go specifically I tend to point to this blogpost and related conference talk, but you already know that one :-) The blogpost is about locking the GIL so that only one Goroutine can use it at a time. There are other ways (that I'm no expert of) to do things with the Python C-API. Like starting multiple GILs in separate threads. For example, here's a (C related) write up on sub-interpreters: |
Beta Was this translation helpful? Give feedback.
-
@jshiwam this might be interesting for you (true multithreading subinterpreters are in Py 3.12 alpha): https://martinheinz.dev/blog/97 |
Beta Was this translation helpful? Give feedback.
-
Hi Everyone,
As we all know multithreading on multiple cores in python is not possible, since we have the GIL which makes sure that one python process will run at a single time on one CPU core.
From G0lang perspective, when we create multiple threads they can run on different cores, but since we are trying to execute python code from golang by making the use of this library, being that said I have the following questions:
Beta Was this translation helpful? Give feedback.
All reactions