Aborting Threads

  • Thread starter Thread starter Glyn Meek
  • Start date Start date
G

Glyn Meek

is there any reason why a Thread.abort command would NOT abort the thread?
It's state indicates it has been aborted, but it keeps on running!!!!

Is it because the thread contains a timer, and I also have to terminate the
timer?
 
If the thread is not in managed code - its in an interop call - then it will run until is re-enters managed code, at that point it will have an exception raised on the thread. So while it is in unmanaged code running, you will still see the status as aborted.

You know Thread.Abort is evil, right?

http://www.interact-sw.co.uk/iangblog/2004/11/12/cancellation and
http://www.dotnetconsult.co.uk/weblog/PermaLink.aspx/4f52c396-1b0d-4419-8871-6ca6992460ca

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

is there any reason why a Thread.abort command would NOT abort the thread?
It's state indicates it has been aborted, but it keeps on running!!!!

Is it because the thread contains a timer, and I also have to terminate the
timer?
 
Ian Griffiths is a fellow DevelopMentor instructor - we've also consulted on the same project a few times. His main love is UI stuff and I believe he's writing a book on Avalon (he's also the author of the DevelopMentor Winforms course). He has spent alot of time in the weird goo of the runtime and has a frustrating knack of knowing something about everything.

He has already written two books, Windows Forms in a Nutshell and Mastering visual Studio both for O'Reilly. Ian's most noteable characteristic is that if he writes about anything technical in any way (even on MSM) he feels compelled to write an enormous treatise on the subject - so you can rarely accuse Ian of being too terse and incomplete ;-)

He's also one of the most interesting bloggers in the .NET space I'm come across.

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

richard
who is ian griffith? (curiosity)
 
and developmentor is?
(c'mon this is the newsgroups so you should expect a follow question :-)
 
DevelopMentor is a training company that specializes in distributed systems

http://www.develop.com

It was co-founded in 1993 by Don Box and many well known .NET people are, or have been, instructors at one time or another. The flagship courses have always been the Geurilla courses, e.g. Geurilla.NET. We have a long list of established .NET courses and we're just starting to roll out our .NET v2.0 classes (Essential.NET 2.0 debuts in London on Dec 6th).

I've been teaching, freelance, for DevelopMentor for about 5 years, starting with Essential COM for C++ Programmers, through Essential.NET, Essential Compact Framework, Geurilla.NET, Programming C# and Essential BizTalk. For example, I'm teaching Guerilla.NET in Portugal next week and in London the week of Nov 29th. I'm then going to Texas to deliver a onsite Essential BizTalk course to a bunch of people from Microsoft (yes, we train alot of Microsoft people in .NET and other technologies). When I'm not teaching I'm consulting and writing (I am co-authoring a SQL Server 2005 book for O'Reilly, due out in Q1/05).

So whats the next follow on question? :-)

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

and developmentor is?
(c'mon this is the newsgroups so you should expect a follow question :-)
 
My followup question is: how many ways do we have of spelling Guerrilla now?
;-)
 
yes,
who is don box?


jjjjjjjuuuuuuuuuuuusssssssssssssstttttttttttttkkkkkkkkkiiiiiiiiiiiiddddddddddddddiiiiiiiiinnnnnnnnnnnngggggggg
 
Back
Top