0

我一直在阅读The Art of Multiprocessor Programming一书,并注意到许多提到的算法都假设线程数是固定的(例如组合树算法)。是否有一种直接的方法可以将此类算法推广到以不可预测的方式创建和销毁线程的场景?

4

1 回答 1

0

As Zneak has said, there is no automatic way of determining the number of threads for an application. There are some patterns though that can help. The book may talk about some...here is an article that I was recently reading that I liked....hope it is useful for you too. Ref: Thread pools and Work queues

于 2013-08-10T21:57:56.163 回答