Reputation: 25
I'd like to ask a question regarding the threading module in the context of my Raspberry Pi project.
Does spawning new threads in the script actually use a different hardware thread?
And if so, is there a limit of threads I can make in the said script? (considering there's a limited amount of physical threads/cores onboard)
Upvotes: 0
Views: 1598
Reputation: 129
As you can read mora on this article, no.
Unfortunately the internals of the main Python interpreter, CPython, negate the possibility of true multi-threading due to a process known as the Global Interpreter Lock (GIL).
Upvotes: 1