Make OldDeletedCleanupThread daemon and don't wait for this thread to cease in ReplicatedChronicleMap.close(), because if the thread is already dead by the time cleanupThread.join() is called, this call hangs

This commit is contained in:
leventov
2016-12-26 14:27:32 +08:00
parent dad7313bf4
commit 4bb2decc34
2 changed files with 1 additions and 13 deletions
@@ -76,6 +76,7 @@ class OldDeletedEntriesCleanupThread extends Thread
OldDeletedEntriesCleanupThread(ReplicatedChronicleMap<?, ?, ?> map) {
super("Cleanup Thread for " + map.toIdentityString());
setDaemon(true);
this.mapRef = new WeakReference<>(map);
cleanupTimeout = map.cleanupTimeout;
cleanupTimeoutUnit = map.cleanupTimeoutUnit;