Alyanto
asked on
Muti-thread application
I am looking for couple of good articles on multi-hreading.
I am planning to scour a set of folders for files in varying states of processing
The file structure might be something like this
..\Inbound\Archive
..\Inbound\Pending
..\Inbound\Archive\DepotA
..\Inbound\Archive\DepotB
I am thinking about threading each file listing because there will be a lot of paths to examine...
I am planning to scour a set of folders for files in varying states of processing
The file structure might be something like this
..\Inbound\Archive
..\Inbound\Pending
..\Inbound\Archive\DepotA
..\Inbound\Archive\DepotB
I am thinking about threading each file listing because there will be a lot of paths to examine...
Give a look at the FileSystemWatcher control. It might do the job for you without having to spend time developing a multi-thread application. Set its Path property to the ..\Inbound directory and IncludeSupDirectories to True, and wait for the changes set in NotifyFilter to trigger its Changed event.
ASKER
Hi James
I had considered this as an option but the development is for our super-users to investigate missing EDI communications. I want to present to them where in the process of import an EDI might be. So this means that this is an adhoc query.
/Aly
I had considered this as an option but the development is for our super-users to investigate missing EDI communications. I want to present to them where in the process of import an EDI might be. So this means that this is an adhoc query.
/Aly
You know that multi-thread does not make applications faster? In fact it can make them slower by the extra time it takes the system to switch from one thread to the other.
The computer can do only one thing at a time and can read only one part of the hard disk at a time. Multi-thread would probably not help you in your situation. It might actually increase the work of the hard disk head and make things a lot slower. It would also make the code more complicated.
Daily hard disk defragmentation, with a good defragmenter (not the one that comes with Windows) might be an easier and better approach.
The computer can do only one thing at a time and can read only one part of the hard disk at a time. Multi-thread would probably not help you in your situation. It might actually increase the work of the hard disk head and make things a lot slower. It would also make the code more complicated.
Daily hard disk defragmentation, with a good defragmenter (not the one that comes with Windows) might be an easier and better approach.
ASKER
Hi James
Point taken but it is a bank of servers so HDD movement is less of an issue here. I think where I am driving at is Parallel Programming on multi cores. I am just not sure how this is achievable in VB.
Kind regards
/Aly
Point taken but it is a bank of servers so HDD movement is less of an issue here. I think where I am driving at is Parallel Programming on multi cores. I am just not sure how this is achievable in VB.
Kind regards
/Aly
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you both for your opinions and information. In summary of what has been said and read the purpose of threading is to improve interface usage by sending tasks with noteable waits to the background. This improves perceived performance to the operator.
So this is a bit of a red herring in the case of what I want to achieve.
So this is a bit of a red herring in the case of what I want to achieve.