How to make full use of CPU cores with threading in python 2

前端 未结 2 1333
挽巷
挽巷 2021-01-24 19:07

The following code seems to be executed sequentially rather than concurrently. And it only made use of one CPU core. Is there a way to make it use multiple cores or switch cont

2条回答
  •  Happy的楠姐
    2021-01-24 19:26

    A friend of mine asked me this once. In your case, just use multiprocessing.process and that will use all your cores.

提交回复
热议问题