Interesting Delay After Thread.Abort()

  • Thread starter Thread starter Doug Thews
  • Start date Start date
OK, I understand. I was just doing some sample code that allowed me to
cancel a sample thread. The thread merely spun around and counted the
number of files in a directory - no reading or writing. No accessing static
vars, mutexes or ReaderWriterLocks. None of that stuff.

But, thanks for the warning. I'm wondering why there isn't as much of a red
flag from the MS camp as I've seen here. You'd think based on the articles
& books I've reviewed so far, that Thread.Abort() is pretty harmless.

BTW .. I'm pretty sure the delay comes from the fact that the exception
handler stuff is being loaded for the first time. Once loaded, further
AbortExceptions generated do not cause the delay. Pure speculation on my
point, but it's the only rational explanation.

--
Doug Thews
Director, Customer Solutions
D&D Consulting Services
----------------
Visit my Tech Blog at:
http://www.ddconsult.com/blogs/illuminati/
 
Back
Top