Why doesn't multithreading in C# reach 100% CPU?

前端 未结 13 1632
眼角桃花
眼角桃花 2021-01-30 22:17

I\'m working on a program that processes many requests, none of them reaching more than 50% of CPU (currently I\'m working on a dual core). So I created a threa

13条回答
  •  情书的邮戳
    2021-01-30 22:50

    Are you sure that your tasks require intensive processor activity? Is there any IO processing? This can be the reason for your 50% load.

    Test: Try using only 2 threads and set he affinity of each thread for each Core. Then open task manager and watch the load of both cores.

提交回复
热议问题