C
Celldss
I'm doing a standard AD query to retrieve a list of workstations that
match certain criteria. I would like to iterate through that list and
see if the workstations are still on the network and have correct dns
records. Part of the difficulty is that the ping & dns check takes
roughly 100ms. This makes my app take rather long as it needs to check
thousands of workstations. I'm hoping multithreading can boost the
speed.
I would like to create several threads (say 10), each that will take a
name off the master list (as a SearchResultCollection), run the
ping/dns check, then output to the main log (a textfile). I'm having
trouble even coming up with the logic on how to do such a thing. How do
I create 10 threads, take a name "off the top" of the result
collection, pass it to each new thread's sub (making sure to take a new
name off the top for each new thread), then fire a new thread as the
previous one completes so my maximum number of threads running
concurrently is 10?
Thank you kindly.
Jason
match certain criteria. I would like to iterate through that list and
see if the workstations are still on the network and have correct dns
records. Part of the difficulty is that the ping & dns check takes
roughly 100ms. This makes my app take rather long as it needs to check
thousands of workstations. I'm hoping multithreading can boost the
speed.
I would like to create several threads (say 10), each that will take a
name off the master list (as a SearchResultCollection), run the
ping/dns check, then output to the main log (a textfile). I'm having
trouble even coming up with the logic on how to do such a thing. How do
I create 10 threads, take a name "off the top" of the result
collection, pass it to each new thread's sub (making sure to take a new
name off the top for each new thread), then fire a new thread as the
previous one completes so my maximum number of threads running
concurrently is 10?
Thank you kindly.
Jason