List.Sort() throws InvalidOperationException (instead of re-throw ThreadAbortException) while thread is being aborted - by Andrzej P

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 605536 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 9/27/2010 4:27:15 AM
Access Restriction Public


List.Sort() throws InvalidOperationException (instead of re-throw ThreadAbortException) when thread is being aborted and ThreadAbortException occurs in Comparer while sorting.
Sign in to post a comment.
Posted by Microsoft on 11/22/2010 at 3:28 PM
Thanks for reporting this issue. I wanted to let you know that we have looked into this and have decided not to change the current behavior. If a Comparer throws an unexpected exception when List<T>.Sort is used, it throws InvalidOperationException and set the inner exception to the unexpected error (in this case ThreadAbortException). This behavior is by design. Also note that it is generally a bad idea to rely on Thread.Abort. Some more info is available here:

Therefore, I've gone ahead and resolved this as Won't Fix. Please let me know if you have any questions or concerns at justinv at microsoft dot com.


Justin Van Patten
CLR Base Class Libraries
Posted by Microsoft on 9/27/2010 at 5:01 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(