Permalink
Browse files

Correctly locked the snapshot on shutdown

  • Loading branch information...
1 parent 575a30f commit a3ce848eeaa174f56f074d0f82d4c462a17d6ba3 @Raphfrk Raphfrk committed Aug 2, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/main/java/org/spout/engine/scheduler/SpoutScheduler.java
@@ -233,6 +233,7 @@ public void run() {
Spout.getLogger().log(Level.SEVERE, "Interrupt while running final snapshot copy: {0}", ex.getMessage());
}
+ TickStage.setStage(TickStage.TICKSTART);
runLastTickTasks();
asyncExecutors.copySnapshot();
@@ -255,7 +256,7 @@ public void run() {
}
try {
- copySnapshot(asyncExecutors.get());
+ copySnapshotWithLock(asyncExecutors.get());
} catch (InterruptedException ex) {
Spout.getLogger().log(Level.SEVERE, "Error while halting all executors: {0}", ex.getMessage());
}
@@ -274,7 +275,7 @@ public void run() {
}
try {
- copySnapshot(asyncExecutors.get());
+ copySnapshotWithLock(asyncExecutors.get());
} catch (InterruptedException ex) {
engine.getLogger().log(Level.SEVERE, "Error while shutting down engine: {0}", ex.getMessage());
}

0 comments on commit a3ce848

Please sign in to comment.