I wish my method to wait about 500 ms and then check if some flag has changed. How to complete this without blocking the rest of my application?
System.Threading.Thread.Sleep(500);
Update
This won't block the rest of your application, just the thread that is running your method.