C
CribGoch
Hi all
I have an Outlook addin running in Outlook 2003 + vs 2005. I use a
BackgroundWorker to do some work on a separate thread. All this works fine.
However, as soon as the user closes Outlook, the background thread (if
running) appears to freeze. The thread seems to be frozen before I get to
handle the closedown in ThisApplication_Shutdown event handler.
thread.IsBusy returns true, but when running in the debugger all
debug.Writeline output ceases, which is what leads me to think that the
thread has frozen. I have tried a loop to wait until IsBusy returns false,
but this never happens.
If I just ignore the thread and let the application close, shutdown
continues as normal, except of course that the thread has not terminated
under my control. This is unsatisfactory.
Does anyone have any ideas?
Regards
Andy
I have an Outlook addin running in Outlook 2003 + vs 2005. I use a
BackgroundWorker to do some work on a separate thread. All this works fine.
However, as soon as the user closes Outlook, the background thread (if
running) appears to freeze. The thread seems to be frozen before I get to
handle the closedown in ThisApplication_Shutdown event handler.
thread.IsBusy returns true, but when running in the debugger all
debug.Writeline output ceases, which is what leads me to think that the
thread has frozen. I have tried a loop to wait until IsBusy returns false,
but this never happens.
If I just ignore the thread and let the application close, shutdown
continues as normal, except of course that the thread has not terminated
under my control. This is unsatisfactory.
Does anyone have any ideas?
Regards
Andy