J
John
I'm using the FileSystemWatcher class to get notified when a file is
created:
myFileSystemWatcher.Created += new FileSystemEventHandler(myHandler);
Sometimes (though rarely), myHandler executes fine. However, most of the
time it appears to die on the first line of execution:
private void myHandler(object source, FileSystemEventArgs e)
{
try
{
Thread.Sleep(4000);
// Do more stuff
}
catch(Exception aException)
{
// This never get called
}
}
If I set a breakpoint on the line:
Thread.Sleep(4000);
It takes a long time for VS2005 to break. However, when it does, everything
looks fine (as far as parameters, registers, etc.). I don't know if I'm
overflowing the stack somehow, or why it is dying.
Does anybody have any ideas? Thanks,
-- John
created:
myFileSystemWatcher.Created += new FileSystemEventHandler(myHandler);
Sometimes (though rarely), myHandler executes fine. However, most of the
time it appears to die on the first line of execution:
private void myHandler(object source, FileSystemEventArgs e)
{
try
{
Thread.Sleep(4000);
// Do more stuff
}
catch(Exception aException)
{
// This never get called
}
}
If I set a breakpoint on the line:
Thread.Sleep(4000);
It takes a long time for VS2005 to break. However, when it does, everything
looks fine (as far as parameters, registers, etc.). I don't know if I'm
overflowing the stack somehow, or why it is dying.
Does anybody have any ideas? Thanks,
-- John