Is it time to deprecate synchronized, wait and notify?
Posted
by
OldCurmudgeon
on Programmers
See other posts from Programmers
or by OldCurmudgeon
Published on 2012-11-21T22:56:06Z
Indexed on
2012/11/21
23:11 UTC
Read the original article
Hit count: 228
Is there a single scenario (other than compatibility with ancient JVMs) where using synchronized
is preferable to using a Lock
? Can anyone justify using wait
or notify
over the newer systems?
Is there any algorithm that must use one of them in its implementation?
I see a previous questions that touched on this matter but I would like to take this a little further and actually deprecate
them. There are far too many traps and pitfalls and caveats with them that have been ironed out with the new facilities. I just feel it may soon be time to mark them obsolete.
© Programmers or respective owner