-
Notifications
You must be signed in to change notification settings - Fork 6k
Address feedback on unsafe-code/best-practices.md #48629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@jkotas when you have a moment, could you please take a look at these changes? |
@@ -947,7 +973,7 @@ While most of the suggestions in this document apply to interop scenarios as wel | |||
|
|||
## 23. Thread safety | |||
|
|||
See [Managed threading best practices](../../standard/threading/managed-threading-best-practices.md) and [.NET Memory Model](https://github.com/dotnet/runtime/blob/main/docs/design/specs/Memory-model.md). | |||
Although memory safety and thread safety are orthogonal concepts, many of the highlighed issues in this document can lead to thread safety issues as well. For example, non-atomic coalesced writes. See [Managed threading best practices](../../standard/threading/managed-threading-best-practices.md) and [.NET Memory Model](https://github.com/dotnet/runtime/blob/main/docs/design/specs/Memory-model.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
many of the highlighed issues in this document
What are the bullet points that this is referring to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was referring to
- Memory access coalescing
- Unaligned memory access
I don't have a strong opinion on this
Co-authored-by: Jan Kotas <[email protected]>
Co-authored-by: Jan Kotas <[email protected]>
Summary
This PR addresses community feedback on #48557 article + some cleanup
26. Compiler warnings
Internal previews