Friday, February 4, 2022

[SOLVED] Question about the threading module and Raspberry Pi

Issue

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)


Solution

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).



Answered By - Iago Henrique
Answer Checked By - Cary Denson (WPSolving Admin)