How do I spawn threads on different CPU cores?

后端 未结 10 2068
梦谈多话
梦谈多话 2020-11-28 20:43

Let\'s say I had a program in C# that did something computationally expensive, like encoding a list of WAV files into MP3s. Ordinarily I would encode the files one at a time

10条回答
  •  没有蜡笔的小新
    2020-11-28 21:27

    Where each thread goes is generally handled by the OS itself...so generate 4 threads on a 4 core system and the OS will decide which cores to run each on, which will usually be 1 thread on each core.

提交回复
热议问题