all groups > visual studio .net debugging > september 2006 >
You're in the

visual studio .net debugging

group:

Slow Exit/BackgroundWorker


Slow Exit/BackgroundWorker Brett Wickard
9/7/2006 1:01:53 PM
visual studio .net debugging:
If I debug my app and run any form that had a backgroundworker on it, the
exit from debugging can take up to 25 seconds. If I have not opened a form
with a backgroundworker on it, the exit from debugging only takes a second
or two...

In the debugger output window, two threads show up right away, and then the
huge delay happens before the main program thread exiting appears in the
Debugger Output window.

Any ideas on how to get the program to exit more quickly?

Re: Slow Exit/BackgroundWorker Brett Wickard
9/7/2006 4:25:35 PM
The answer:

The background worker checks to see if a file exists. If the path is
errant, the IO.Directory.Exists line sits there, so if the program exits,
the debugger waits for the background worker to complete. Should have been
obvious, but we must have overlooked it on first perusal.


[quoted text, click to view]

AddThis Social Bookmark Button