Code example for Lock

Methods: lockInterruptibly

0
        l.lock();
    } 
     
    @Override 
    public void lockInterruptibly() throws InterruptedException { 
        l.lockInterruptibly();
    } 
     
    @Override 
    public boolean tryLock() { 
        return l.tryLock();
    } 
     
    @Override 
    public boolean tryLock(long time, TimeUnit unit) throws InterruptedException {
        return l.tryLock(time, unit);
    } 
     
    @Override 
    public void unlock() {