Add safe blocks with Rust-like thread-safety guarantees #4775
Unanswered
ivanivanyuk1993
asked this question in
Language Ideas
Replies: 1 comment 1 reply
-
Rust is a language designed around its ownership semantics, which means it's used for more than just thread-safety (namely, memory management) and that ownership is everywhere and people who use Rust are okay with that. How exactly do you suggest to add such a system to C#? Consider that:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Recently I've read some articles about Rust from my news feed and tried to rewrite some simple sharded concurrent queue and guava-like loading observable cache from C# to Rust
Rust compiler found a race in my guava-like loading observable cache, which I missed and tests didn't notice it too, since chance of race was low, and also I noticed that I didn't need to think as much about thread safety in Rust, so I want to have same ease of writing thread-safe code in C#, hence I propose safe blocks with Rust-like lifetimes and ownership or something similar to have compile-time thread-safety guarantees in C#, since Rust proved that it is possible to achieve
Beta Was this translation helpful? Give feedback.
All reactions