I want to emulate one of my java programs in VB. It is a multithreaded file copying program that is based on a que class that I created. It works great, unfortunately java is a pain to distribute to non-java users!
I am not even sure VB can handle threads in the same manor that java can handle them. I put some thought into this and came up with simply creating a file copy class and just creating an array of file copy objects to handle the copying. The only problem that I don't know how to address is locking the access to the que while another thread is getting the file it is supposed to copy. In other words each thread must only be able to copy a unique file.
for example the que could contain 4 files of different sizes.
que:
file1
file2
file3
file4
Say we have two threads, it is simple to give the first thread the first file and the second thread the second file. after the initial assignment of files to the threads, I want the first thread that is done copying to retrieve the next file in the que, but I also want to make sure that it is not given to another thread at the same time. how would this be accomplished in VB?
Troy Williams B.Eng.
fenris@hotmail.com
I am not even sure VB can handle threads in the same manor that java can handle them. I put some thought into this and came up with simply creating a file copy class and just creating an array of file copy objects to handle the copying. The only problem that I don't know how to address is locking the access to the que while another thread is getting the file it is supposed to copy. In other words each thread must only be able to copy a unique file.
for example the que could contain 4 files of different sizes.
que:
file1
file2
file3
file4
Say we have two threads, it is simple to give the first thread the first file and the second thread the second file. after the initial assignment of files to the threads, I want the first thread that is done copying to retrieve the next file in the que, but I also want to make sure that it is not given to another thread at the same time. how would this be accomplished in VB?
Troy Williams B.Eng.
fenris@hotmail.com