1
Reply

Scheduling a thread

sagar devanahalli

sagar devanahalli

Dec 30 2013 8:04 AM
1.1k
Hi guys,
 
I have a windows service which will open excel documents from a folder and does some processing, with in the same service I have one more function which checks whether all the Excel files have been processed or not.
My goal is to create 2 threads.
Thread1 : Will look after the processing of Excel Files
 Thread2 :Will validate all Excel Files are processed or not.
 
I want to schedule Thread2 at  regular intervals so that if it finds that there are some excel files which are not processed then Thread1 need to be killed and restarted again. My question is How can we schedule Thread2 which in turn invokes a function with integer return type?
 
Thanks in advance.


Answers (1)