所有锁的unlock要放到try{}finally{}里,不然发生异常返回就丢了unlock了 转载于:https://www.cnblogs.com/MyLifeMyWay/p/8484378.html