waiting

Waiting until a file is available for reading with Win32

I'm watching a directory by calling ReadDirectoryChangesW synchronously. When a new file is available, I try to access it immediately with CreateFile with GENERIC_READ and FILE_SHARE_READ, but this gives me ERROR_SHARING_VIOLATION. The process that put the file in the watched directory does not finish writing by the time I try to read it...

c# waiting for event within a function

Hi, My goal: User should be able to get the html source of a page, when clicked on a button. This event opens a new form with a geckoWebBrowser component and navigates to a given url. Once this is done it fires a documentCompleted event. Then I can start loading the DOM. The problem: While the loading of the page needs time, I have to ...

What to do when waiting for an application to compile?

I find that local builds will some times take 5-10 minutes of an application we are working on, but I always feel a little icky about going on line during that time... kind of like now ;). What do you guys do when waiting for your application to compile? ...