How to run several subroutiones at the same time

jsn1

Member
Joined
Jul 14, 2006
Messages
12
Programming Experience
10+
Hi all,

I wrote a vb.net console application, that compares files located in a server to the same files and folders located in a laptop and updates the laptop files if the file is older than the one on the server.

When I run my program it runs sequentially reading
- folder A and comparing it with folder A in the laptop (subroutine A)
- next folder B and comparing it with folder A in the laptop (subroutine B)
- next folder C and comparing it with folder C in the laptop (subroutine C)
- next folder C and comparing it with folder C in the laptop (subroutine D)

What do I need to change in my program to be able to execute the reading of Folders A,B,C,D at the same time, to have a simultaneous execution.

thanks
jsn
 
I think the most proper way would be to begin looking into the Threading namespace and sending each event off to its own thread, this however gets into some very serious code, very quickly.

Take a look instead at the Background Worker found here. Dig around in that MSDN information and bounce back questions once you have them, I'll try to answer as I can. Note that you will need Framework2.0.
 
Back
Top