锁优化的思路和方法

减小锁持有时间 public synchronized void syncMethod() { othercode1(); mutextMethod(); othercode2(); } public void syncMethod() { othercode1();               synchronized mutextMethod(); othercode2();
相关文章
相关标签/搜索