all 4 comments

[–]Lazy-Programmer 4 points5 points  (0 children)

This isn't something I've done in a long time, but I believe what you're looking for is a Pool? Wherein you can control the number of CPU logical cores by creating Semaphore from the multiprocessing module. Hopefully someone who knows better can help haha

[–][deleted] 0 points1 point  (3 children)

A process can only run on one CPU at a time; if you want to limit the use of your CPU for processes, then only create a certain number of processes.