mirror of
https://github.com/LukeHagar/unicorn-utterances.git
synced 2025-12-10 12:57:46 +00:00
Update content/blog/new-post-mutable-vs-immutable/index.md
Co-authored-by: Corbin Crutchley <crutchcorn@gmail.com>
This commit is contained in:
committed by
Corbin Crutchley
parent
4270a26432
commit
0f607a2765
@@ -95,7 +95,7 @@ testUser = testUser.increaseAgeByOne(); // instance B
|
|||||||
|
|
||||||
Now in the scenario that Thread 1 is reading `instance A` and Thread 2 wants to increase the age, it will have to do so by creating an `instance B` instead of directly modifying `instance A`, so it is assured that Thread 1 will produce expected behaviour.
|
Now in the scenario that Thread 1 is reading `instance A` and Thread 2 wants to increase the age, it will have to do so by creating an `instance B` instead of directly modifying `instance A`, so it is assured that Thread 1 will produce expected behaviour.
|
||||||
|
|
||||||
## Conclusion
|
# Conclusion
|
||||||
|
|
||||||
Thread safety is a very complicated topic, but it's important to understand the concept
|
Thread safety is a very complicated topic, but it's important to understand the concept
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user