In C# is there a thread scheduler for long running threads?

Posted by LogicMagic on Stack Overflow See other posts from Stack Overflow or by LogicMagic
Published on 2010-04-22T13:15:35Z Indexed on 2010/04/22 13:23 UTC
Read the original article Hit count: 145

Filed under:
|

Hi,

Our scenario is a network scanner.

It connects to a set of hosts and scans them in parallel for a while using low priority background threads.

I want to be able to schedule lots of work but only have any given say ten or whatever number of hosts scanned in parallel. Even if I create my own threads, the many callbacks and other asynchronous goodness uses the ThreadPool and I end up running out of resources. I should look at MonoTorrent...

If I use THE ThreadPool, can I limit my application to some number that will leave enough for the rest of the application to Run smoothly?

Is there a threadpool that I can initialize to n long lived threads?

© Stack Overflow or respective owner

Related posts about c#

Related posts about multithreading