I just discovered a module called threading in Python, and it opened a whole world of doors for me. I’m able to do a lot of things I couldn’t do before.
But now that I think about it am I limited by my processor threads? I’m using an i7-8700k (6 Cores, 12 Threads) Like every time a start threading a function with Thread(target=func).start() am I using 1 whole “physical” thread? I’d be a little scared to run a program that uses more than the available threads. Will it be a problem?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
No, you are not using a full thread don’t worry about that.
You could check this SO topic for more info: How do threads work in Python, and what are common Python-threading specific pitfalls?
Another library that might interest you is asyncio: https://docs.python.org/3/library/asyncio.html
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0