Re: Threads by David
David
Thu May 06 20:58:54 CDT 2004
"Juan Carlos" <anonymous@discussions.microsoft.com> wrote in message
news:084CE2EC-8AC1-4E10-9604-461C43131184@microsoft.com...
> Hi
>
> I have an aplication made with C#. It executes stored procedures using
threads. I threw a thread and it executes the store. I want to kill it, but
I don't kwon if I procesess executed by the thread, stops too.
>
> For example:
>
> I threw a thread and it begins to execute the stored called TEST1, then I
kill the thread.
>
> Do I stop TEST1's execution? I say NO, but I'm not sure.
>
> Does someone help me?
>
That is an implementation detail of your ADO.NET data provider. Somewhere
deep down in the bowles of the provider it will be running some bit of code
like:
socket.Read()
Probably blocking on a socket read, waiting for the procedure to finish.
When you kill the thread it will cause a ThreadAbortException on that
thread. Now in the provider there may be a catch block, and in that catch
block it may send a message to the server to cancel the pending operation.
Or it may not.
David