views:

767

answers:

3

Hi all. What is the most recommended .NET custom threadpool that can have separate instances i.e more than one threadpool per application? I need an unlimited queue size (building a crawler), and need to run a separate threadpool in parallel for each site I am crawling.

Edit : I need to mine these sites for information as fast as possible, using a separate threadpool for each site would give me the ability to control the number of threads working on each site at any given time. (no more than 2-3)

Thanks Roey

+1  A: 

Ask Jon Skeet: http://www.yoda.arachsys.com/csharp/miscutil/

Parallel extensions for .Net (TPL) should actually work much better if you want a large number of parallel running tasks.

Groo
This is used for parallelizing to more than one CPU-core, however it doesn't solve my problem as the individual TaskManagers can't tell me when they've finished running all their tasks.
Roey
+2  A: 

I believe Smart Thread Pool can do this. It's ThreadPool class is instantiated so you should be able to create and manage your separate site specific instances as you require.

AdamRalph
+1  A: 

Ami bar wrote an excellent Smart thread pool that can be instantiated.

take a look here

yosig81
-1 for duplicate answer. AdamRalph had already posted that.
Robert MacLean
+1 the answer was 2 min later. AdamRalphs' answer was prob not up yet.
Simon