Timer and Theading question

K

kimberly.walker

I have a console application that calls 2 different delegates (Timers).
The 1st Timer runs every 30 seconds this checks emails if there is an
email it inserts the email into sql server. The other timer runs once
a day that connects to the active directory and gets information from
it and inserts it into sql server as well. My question is the 1st
timer when it runs if for some reason it hangs or if it doesn't finish
its process before it is surpose to fire again how can I make it wait
until the process is finish or am I ok and don't have to do anything.
Any help will be greatly appreciated...
 
G

Guest

You could just stop the timer at the start of your processing and then start
it again when completed. But if you need it to always be exactly 30 seconds,
that may not be acceptable. You could also use a mutex (i.e. lock(this) or
similar) before running your processing.

-Marc C
 
B

Brian Gideon

There are 3 different timers in the base class library. Which one are
you using?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top