moving 20,000 files at a time from one location to another. Adding threads
won't help very much (it will help a little, but not much). The reason is
that you are not thread-bound or even processor-bound... you are disk-bound.
In other words, you can't go any faster than the time it takes to move
blocks of data off of your disk (and either back onto the disk or out your
network port).
After more than a small number of threads (<12), there will be no advantage
to adding more threads... so plan to queue the requests and run through the
queue on each thread as fast as you can.
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Raed Sawalha" <Ra*********@discussions.microsoft.com> wrote in message
news:8D**********************************@microsof t.com...
Dear:
I need to know what should I do for the following scenario:
1. Application will continously listen to a folder waiting a files to be
copied
2. so for each file copies should be a thread to process the file then
deliver the reuslts
3. the expected number of file that maybe copied at same time is more
than 20,000 files.
so is using ThreadPool in this case is right solution???
if not what should I use to manage the threads?>