Brett McCoy wrote: > On Wed, Jul 16, 2008 at 10:19 AM, Knowledge Seeker > <[EMAIL PROTECTED]> wrote: > > >> Guys guys .... forget about Process A.......just think about process B. >> Process B has to create a watch thread that look for directory >> modifications. >> Whenever a file gets copied the directory structure changes, the thread >> should come to know that a file has been copied, now the program will >> open the directory and read the text files, dump over the console, and >> delete the file. >> > > I understand that... but why do you need to use threads? A single > process with a single thread is kind of redundant... or does process B > have multiple threads? If so, what are the other threads doing? Or are > process A and process B part of the same program as multiple threads? > > -- Brett >
Sorry for being late. Hmmm.... thats a design question :). Actually I was thinking to keep a directory watch thread, and file consumption thread, in process B. The directory watch thread will send a 'new file in directory' notification to the file consumption thread, and the file consumption thread when receive this notification will read the text file and display the contents on screen and delete the file. That was how I was thinking. Any suggestions ?
