Standardize how disableThreadSafetyCheck is done for Closeable, https://github.com/OpenHFT/Chronicle-Core/issues/245

This commit is contained in:
Peter Lawrey
2021-08-23 17:13:00 +01:00
parent 6a89139d4e
commit c93db3bcc1
@@ -222,6 +222,8 @@ public abstract class VanillaChronicleHash<K,
preShutdownAction = privateAPI.getPreShutdownAction();
skipCloseOnExitHook = privateAPI.skipCloseOnExitHook();
disableThreadSafetyCheck(true);
}
public static IOException throwRecoveryOrReturnIOException(@NotNull final File file,
@@ -683,12 +685,6 @@ public abstract class VanillaChronicleHash<K,
return sizeInBytesWithoutTiers + allocatedExtraTierBulks * tierBulkSizeInBytes;
}
@Override
protected boolean threadSafetyCheck(boolean isUsed) {
// disabled for chronicle map
return true;
}
@Override
protected void performClose() {
if (resources != null && resources.releaseManually()) {