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?

Thanks

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



RE: Threads by anonymous

anonymous
Tue May 11 17:16:02 CDT 2004

Thanks David

I have another question. I need to use Nested Threads, I can throw a parent thread and then throw his son threads, but my problem is to make a pause, because sometimes I can't throw all son threads, I have to throw for example three, then I wait to finish to execute them and then throw the last two threads

Can I do it

Thanks again
Regard
J.C.