Mercurial Hosting > luan
comparison src/luan/modules/ThreadLuan.java @ 1408:5b8f76e26ab7
remove old backups
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 24 Sep 2019 15:02:33 -0600 |
parents | 27efb1fcbcb5 |
children | 225808b90cee |
comparison
equal
deleted
inserted
replaced
1407:1979cff9aad2 | 1408:5b8f76e26ab7 |
---|---|
241 public static synchronized void removeGlobalCallable(String name) { | 241 public static synchronized void removeGlobalCallable(String name) { |
242 callableMap.remove(name); | 242 callableMap.remove(name); |
243 } | 243 } |
244 | 244 |
245 | 245 |
246 public static final ReadWriteLock backupLock = new ReentrantReadWriteLock(); | |
247 | |
248 public static void lock(Lock lock) | 246 public static void lock(Lock lock) |
249 throws LuanException, InterruptedException | 247 throws LuanException, InterruptedException |
250 { | 248 { |
251 if( !lock.tryLock(10,TimeUnit.MINUTES) ) | 249 if( !lock.tryLock(10,TimeUnit.MINUTES) ) |
252 throw new LuanException("failed to acquire lock"); | 250 throw new LuanException("failed to acquire lock"); |