matt_d_p
asked on
Is threading a good option?
Hi
My problem:
I need to connect to a bunch of computers (4000) and execute a batch file. Because these computers are in use I have a limited window in which to accomplish this. My idea is to use a threadpool with each thread making a remote connection and executing the batch file in order to improve the time to complete. Will threading improve my time to complete. I will probably use the WMI Win32_process.create method to run the batch file.
Target computers: WinXP without .NET
Matt
My problem:
I need to connect to a bunch of computers (4000) and execute a batch file. Because these computers are in use I have a limited window in which to accomplish this. My idea is to use a threadpool with each thread making a remote connection and executing the batch file in order to improve the time to complete. Will threading improve my time to complete. I will probably use the WMI Win32_process.create method to run the batch file.
Target computers: WinXP without .NET
Matt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Apresto
My thread will be working on a seperate remote machine in each case so I don't need to worry about syncronization or anything like that. I'm hoping that running multiple threads will reduce my time as I think a lot of the single process time is spent waiting on the network.
the only place I might have to be careful is I'd like to output the machine name to a text file for record purposes but I think I can use the built in delegate for that.
My thread will be working on a seperate remote machine in each case so I don't need to worry about syncronization or anything like that. I'm hoping that running multiple threads will reduce my time as I think a lot of the single process time is spent waiting on the network.
the only place I might have to be careful is I'd like to output the machine name to a text file for record purposes but I think I can use the built in delegate for that.
A good book that discusses threading is:
C# Threading Handbook by Wrox ISBN: 1861008295