L
LP
Hi,
I am starting a new thread from the main UI thread. If users clicks cancel
button, the thread is aborted:
workerThread.Abort();
ThreadAbort Exception is handeled in the worker thread:
catch (System.Threading.ThreadAbortException ex)
{
//thread aborted send this message to the client
OnProcessAbort(new WorkerProcessBalanceEventArgs(ex.Message, 0, 0, false));
}
Everything seems to work. But I am noticing in SQL Profiler that it doesn't
logout active connection as it usually does if I let this thread just run
through. Keep in mind that conection object is not visiable to worker thead.
Worker thread creates another object written by other group of developers
that does all db related work. At this time I can not modify db related
class, because they're working on the new release, so my changes will be
lost.
Is there a way to close all open connections within appDomain when worker
thread is aborted? Thank you.
I am starting a new thread from the main UI thread. If users clicks cancel
button, the thread is aborted:
workerThread.Abort();
ThreadAbort Exception is handeled in the worker thread:
catch (System.Threading.ThreadAbortException ex)
{
//thread aborted send this message to the client
OnProcessAbort(new WorkerProcessBalanceEventArgs(ex.Message, 0, 0, false));
}
Everything seems to work. But I am noticing in SQL Profiler that it doesn't
logout active connection as it usually does if I let this thread just run
through. Keep in mind that conection object is not visiable to worker thead.
Worker thread creates another object written by other group of developers
that does all db related work. At this time I can not modify db related
class, because they're working on the new release, so my changes will be
lost.
Is there a way to close all open connections within appDomain when worker
thread is aborted? Thank you.