TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Scott Lackey
NA
9
8.5k
Thread.Sleep issue
Oct 28 2010 9:46 AM
Hello All
I'm having trouble with a Thread.Sleep issue, as I'm purposley trying to cause a 5 minute delay in a service oriented application I'm supporting. When monitoring for a specific exception, I'm using a Thread.Sleep(300000) statement. 300,000 milliseconds = 5 minutes, right? Trouble is, the delays encountered are never 5 minutes, always less, and they vary, sometimes 30 seconds, sometimes 40 seconds, sometimes a full minute. Anybody have any idea why?
Note: I have my Thread.Sleep(300000) in a catch block where I'm monitoring for IOException, specifically a semaphore timeout period. Would this type of exception cause the thread.sleep to behave sporadically as I described above? The five minute delays seem to work consistently in other areas of the application.
Any insights? Would be appreaciated!
Thanks!
Reply
Answers (
5
)
Help with a class proplem
RS232 port reading technics