When Should I Use Threads?

前端 未结 5 737
情深已故
情深已故 2020-12-29 07:31

As far as I\'m concerned, the ideal amount of threads is 3: one for the UI, one for CPU resources, and one for IO resources.

But I\'m probably wrong.

I\'m ju

5条回答
  •  忘掉有多难
    2020-12-29 08:27

    Herb Sutter wrote an article for Dr. Dobb's Journal in which he talks about the three pillars of concurrency. This article does a very good job of breaking down which problems are good candidates for being solved via threading constructs.

提交回复
热议问题