holdlock
线程类静态布尔值holdLock(Object o) (Thread Class static boolean holdLock(Object o))
This method is available in package java.lang.Thread.holdLock(Object obj).
软件包java.lang.Thread.holdLock(Object obj)中提供了此方法。
This method is used to lock the current thread on the specified object is given in the method.
此方法用于将当前线程锁定在该方法中给定的指定对象上。
This method is static so we can access this method with the class name too.
该方法是静态的,因此我们也可以使用类名访问此方法。
The return type of this method is boolean so it returns true or false if returns true indicating the current thread to be locked on the given object in the method else return false.
此方法的返回类型为boolean,因此如果返回true表示该方法中要锁定给定对象的当前线程,则返回true或false,否则返回false。