开发者

What is a thread pool in C++ and how it is implemented? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 5 years ago.

Improve this question 开发者_JS百科

I just came across a new term: thread pool. I don't know what it is, can any ody offer some information about this?

What it is a thread pool and how it is implemented?

Is a thread pool just a collection of threads?


ThreadPool is basically collection of threads. Whenever a task is assigned to the threadpool, the available thread accepts the task and executes it.

The advantages of thread pool is to control the threads creation\destruction and also, optimize the thread usage.

Thread Pool concept is not the C++ language feature. There are many custom implementation of thread Pool. ( Using different strategies).

You can also read

  • thread pool in .NET
  • The threadpool library

to know more.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜