开发者

Max number of threads in Reactive Extensions / Parallel Extensions

Since Microsoft probably killed all download links 开发者_运维技巧to the Parallel Extensions CTP, I am totally lost.

I want to specify the max number of tasks running at a certain time, as I want more threads than processors. Any clue how to do this in RX?


Are you able to specify the TaskFactory used in RX? If so, you can create one with a TaskScheduler with an appropriate concurrency level. It's not obvious to me at the moment whether there are "stock" schedulers which allow this, or whether it's hidden away (Parallel LINQ certainly offers "maximum concurrency" options) but that's the general plan.

Of course, if you can't change which task factory is being used, this doesn't help much.


I used the default ThreadPool instead.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜