holdlock_带示例的Java线程类静态布尔值holdLock(Object o)方法

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。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值