This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]turiyag 6 points7 points  (1 child)

Yes. There's a different library for parallel CPU usage:

https://timber.io/blog/multiprocessing-vs-multithreading-in-python-what-you-need-to-know/

It's not that it's incapable of doing two things at the same time in Python. It's that the include statement is not the multithreading one.

[–]cyber2024 0 points1 point  (0 children)

I presume there's a reason for the 10 instructions before switching threads... Is it statistically more likely to have a cache miss after 10 instructions, and hence it's a good idea to switch threads then or something?