Is there a mechanism for ignoring calls to a method while it is running in Java?

前端 未结 0 1552
天涯浪人
天涯浪人 2020-11-22 06:06

My goal is to have a method that is synchronized on an Object like so...

Object lock = new Object();

private void save() {
    synchronized (lock) {
                 


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题