I have been trying to learn design patterns. This site uses the synchronized keyword, but I don't understand what it does.
I searched on the net and found that it is somewhat related to multi-threading and memory, but I am a mechanical engineer and don't understand what that means.
Can anybody please help me understand threads and the synchronized keyword?
There is no
synchronizedkeyword in C++.There is one in Java, though, where for methods it means the following two things:
Similar rules apply to arbitrary blocks.
Also, I recommend learning from a peer-reviewed book, not some arbitrary non-authoritative website.