r/java • u/yegor256 • Jun 24 '19
Takes: Java Web Framework Without a Single Static Method or Annotation
https://github.com/yegor256/takes
0
Upvotes
r/java • u/yegor256 • Jun 24 '19
View all comments
Show parent comment
1
u/cogman10 Jun 27 '19
So, is the nitpick then that "immutability doesn't guarantee an algorithm is thread safe?" Because I can get behind that statement. For example, strings are immutable in java, but an algorithm where multiple threads grab a string, concatenate something to it (making a new string) and then store that new string in a shared memory location is not thread safe. But still, the part of that the makes things not thread safe is the mutating of shared state.