Threads

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Juan Carlos said:
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
 
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.
 
Back
Top