public static void setPolicy(CycleDetectingLockFactory.Policy policy) { Threading.policy = policy; factory = CycleDetectingLockFactory.newInstance(policy); }
public static ReentrantLock lock(String name) { if (Utils.isAndroidRuntime()) return new ReentrantLock(true); else return factory.newReentrantLock(name); }