Quantcast
Channel: User Sinatr - Stack Overflow
Viewing all articles
Browse latest Browse all 601

Comment by Sinatr on C# .NET : is "lock" required around ImmutableList reference copy?

$
0
0
"I guess ...", yes, it's about atomicity. The reading of the pointer value, which points to either old or a new collection is safe, but ensuring writing/reading pointer is atomic require lock. From my desktop applications experience atomicity is really not an issue, I read/write values from different threads without locks and never had a problem.

Viewing all articles
Browse latest Browse all 601

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>