Whats the best way to send my app to sleeping waiting for a condition without it becoming unresponsive?
Posted on 2006-05-10
I have a function in my app that checks the condition of an external app. When this condition is met my app can carry on through its sequence of events.
I have used thread.sleep(1000) in a self calling loop but my app becomes unresponsive so I decided a system.timer is the way forward but because of their very asynchronous nature my app wants to continue through it's sequence when my condition is not yet met.
I know I could set a flag within timer event but then i would have to be in a constant loop checking this flag!