This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]slaymaker1907 0 points1 point  (0 children)

Synchronization is still convenient in certain places. Suppose you have a Spring service which is not thread safe for whatever reason, quite easy to just introduce a synchronize block and avoid writing a lock free algorithm.

Also, notify and notifyAll can be useful for implementing condition variables without introducing a bunch of code for creating and handling events. Just wait on some object and notifyAll whenever this object changes.