提交 39c616d1 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Add a comment

上级 7b2fcf7f
...@@ -2811,6 +2811,13 @@ public class MVStore implements AutoCloseable { ...@@ -2811,6 +2811,13 @@ public class MVStore implements AutoCloseable {
} }
int millis = 1; int millis = 1;
while (state != STATE_CLOSED) { while (state != STATE_CLOSED) {
/*
* We need to wait for completion of close procedure. This is
* required because otherwise database may be closed too early while
* underlying storage still has unreleased resources. The quickly
* following connection attempts fail with The file is locked
* exception.
*/
try { try {
Thread.sleep(millis++); Thread.sleep(millis++);
} catch (InterruptedException e) { } catch (InterruptedException e) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论