469,625 Members | 1,741 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

Abt thread

Hi

I faced one exception when use the thread in c#. I start the thread
in a class.Then i start the thread thru the main method constructor.In
that thred i use the thred.sleep() method.

Then one button i place in my project.That purpose is stop all
functions ans close my application.In that button i call the Dispose()
method.In that Dispose(0 method i call the thread.abort method.

but i face the exception.

System.Threading.ThreadAbortException + Thread was being
aborted

Plz give any suggestion for solving it.

Mar 20 '07 #1
1 1068
malu wrote:
Hi

I faced one exception when use the thread in c#. I start the thread
in a class.Then i start the thread thru the main method constructor.In
that thred i use the thred.sleep() method.

Then one button i place in my project.That purpose is stop all
functions ans close my application.In that button i call the Dispose()
method.In that Dispose(0 method i call the thread.abort method.

but i face the exception.

System.Threading.ThreadAbortException + Thread was being
aborted

Plz give any suggestion for solving it.
Trowing a ThreadAbortException in the thread is the way that the thread
is aborted. The thread can handle being aborted by catching the exception.

--
Göran Andersson
_____
http://www.guffa.com
Mar 20 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by adeger | last post: by
4 posts views Thread by Gilles Leblanc | last post: by
7 posts views Thread by Ivan | last post: by
4 posts views Thread by Matthew Groch | last post: by
5 posts views Thread by Razzie | last post: by
16 posts views Thread by droopytoon | last post: by
9 posts views Thread by mareal | last post: by
13 posts views Thread by Bob Day | last post: by
7 posts views Thread by Charles Law | last post: by
3 posts views Thread by John Nagle | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.