Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4084268
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:25:05+00:00 2026-05-20T18:25:05+00:00

I have a library to manage the threads built on .NET 3.5. When I

  • 0

I have a library to manage the threads built on .NET 3.5. When I am trying to upgrade it to .NET 4.0 some of the unit tests failed according to the Thread.Abort method.

In brief of those unit tests, the thread states are tracked from creation to stopped. When the thread is being aborted, those unit tests track the states from Running -> AbortRequested -> Aborted -> Stopped. The sequence is working exactly identical on .NET 3.5 using VS2008 or VS2010. Until I upgrade it to .NET 4.0 on VS2010, the unit tests fail. The result is the thread remains in Aborted state.

I have checked MSDN about the Thread.Abort and here is the words, “After Abort is invoked on a thread, the state of the thread includes AbortRequested. After the thread has terminated as a result of a successful call to Abort, the state of the thread is changed to Stopped.“

Is there anyone having the same problem? Is the .NET 4.0 threading behavior correct? If the thread stays on Aborted, does it have any impact?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:25:05+00:00Added an answer on May 20, 2026 at 6:25 pm

    I repro. Go ahead and assume it is a bug-fix. Having the state going back to Stopped doesn’t make much sense.

    There’s an old feedback report about it here. They acknowledge that the behavior in .NET 2.0 doesn’t match the documented behavior but that it was too late to fix the problem. Although closed, I strongly suspect they fixed it for 4.0. Ironically, it looks like the documented behavior was updated in the MSDN Library, now again mismatching the actual behavior.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a library made in C++/GDI that I am trying to port to
I have single-thread windows form application written with VB.NET and targeting Framework 1.1 .
I'm writing myself a class library to manage Active Directory. I have an interface:
I have two threads, a consumer and a producer. The consumer thread is the
Scenario: I have been using Java SE for quite some time, working with threads
I have built a multilingual website with CodeIgniter using this library: http://codeigniter.com/wiki/URI_Language_Identifier/ I use
I have a managed class library (say mylib.dll) and a 3rd party managed app
I have a library with an Interface. Public Interface Progress { int ProgressValue{get;set;}, string
I have a library project that should be the base for several web applications.
We have a library created as both .lib and .dll (it's a big library

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.