RFD: Replace class java.lang.Shutdown.Lock with Object?

Eirik Bjørsnøs eirbjo at gmail.com
Tue Jan 27 12:27:31 UTC 2026


On Tue, Jan 27, 2026 at 1:06 PM Glavo <zjx001202 at gmail.com> wrote:

> >  Was there ever any thoughts to add an API point for defining new montor
> objects, such as Object.newLock() or perhaps even something like
> Object.newLock(Class context, String tag)?
>
> Does it have any advantages over ReentrantLock?
>

Hello Glavo,

This discussion has been focused on monitor lock objects used for plain old
Java synchronization. Whether ReentrantLock has advantages over Java
synchronization is an interesting discussion, but probably a side track
from this one. A lot of code uses synchronized just fine, that's probably
not going to change any day soon.

Cheers,
Eirik.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20260127/78045a9b/attachment.htm>


More information about the core-libs-dev mailing list