Skip to content

houjie1212/key-lock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

public void oneMethod() {
    KeyLock<String> lock = KeyLock.getLock("the key");
    lock.lock(); // 支持Lock接口的所有方法
    try {
        // ...
    } finally {
        lock.unlock();
    }
}

About

A key based lock, implement by ReentrantLock

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages