Skip to content

Conversation

gewarren
Copy link
Contributor

Follow up to dotnet/docs#29624.

  • Mostly cleans up formatting.
  • Removes some .NET Framework 1.1 info.
  • Notates some remarks as applicable only to .NET Framework.

@gewarren gewarren requested a review from kouvel as a code owner May 26, 2022 21:55
@ghost ghost assigned gewarren May 26, 2022
> [!IMPORTANT]
> The `Thread.Abort` method should be used with caution. Particularly when you call it to abort a thread other than the current thread, you don't know what code has executed or failed to execute when the <xref:System.Threading.ThreadAbortException> is thrown. You also cannot be certain of the state of your application or any application and user state that it's responsible for preserving. For example, calling `Thread.Abort` may prevent the execution of static constructors or the release of unmanaged resources.
> Use the `Thread.Abort` method with caution. Particularly when you call it to abort a thread other than the current thread, you don't know what code has executed or failed to execute when the <xref:System.Threading.ThreadAbortException> is thrown. You also cannot be certain of the state of your application or any application and user state that it's responsible for preserving. For example, calling `Thread.Abort` may prevent the execution of static constructors or the release of managed or unmanaged resources.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or the release of managed or unmanaged resources

Managed resources would be released at some point, I think the main issue is with unmanaged resources.

@opbld30
Copy link

opbld30 commented May 26, 2022

Docs Build status updates of commit b64c4fb:

✅ Validation status: passed

File Status Preview URL Details
xml/System.Threading/Thread.xml ✅Succeeded View
xml/System.Threading/ThreadAbortException.xml ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

> [!IMPORTANT]
> The `Thread.Abort` method should be used with caution. Particularly when you call it to abort a thread other than the current thread, you don't know what code has executed or failed to execute when the <xref:System.Threading.ThreadAbortException> is thrown. You also cannot be certain of the state of your application or any application and user state that it's responsible for preserving. For example, calling `Thread.Abort` may prevent the execution of static constructors or the release of unmanaged resources.
> Use the `Thread.Abort` method with caution. Particularly when you call it to abort a thread other than the current thread, you don't know what code has executed or failed to execute when the <xref:System.Threading.ThreadAbortException> is thrown. You also cannot be certain of the state of your application or any application and user state that it's responsible for preserving. For example, calling `Thread.Abort` may prevent the execution of static constructors or the release of managed or unmanaged resources.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> Use the `Thread.Abort` method with caution. Particularly when you call it to abort a thread other than the current thread, you don't know what code has executed or failed to execute when the <xref:System.Threading.ThreadAbortException> is thrown. You also cannot be certain of the state of your application or any application and user state that it's responsible for preserving. For example, calling `Thread.Abort` may prevent the execution of static constructors or the release of managed or unmanaged resources.
> Use the `Thread.Abort` method with caution. Particularly when you call it to abort a thread other than the current thread, you don't know what code has executed or failed to execute when the <xref:System.Threading.ThreadAbortException> is thrown. You also cannot be certain of the state of your application or any application and user state that it's responsible for preserving. For example, calling `Thread.Abort` may prevent the execution of static constructors or the release of unmanaged resources. It can even corrupt managed data structures.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kouvel I updated it based on dotnet/docs#29624 (comment). Does this look okay to you?

@gewarren gewarren merged commit 7350f1f into dotnet:main Jun 2, 2022
@gewarren gewarren deleted the thread-abort branch June 2, 2022 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants