Skip to content

Commit

Permalink
MONDRIAN: Removes the hook to the Runtime instance for statement clea…
Browse files Browse the repository at this point in the history
…nup. This code is useless, since all threads are marked as daemons and thus get cleaned up properly. We originally added that hook suspecting a JVM hang at shutdown was caused by the RolapResultShepherd, but it turns out it was caused by something else.

[git-p4: depot-paths = "//open/mondrian/": change = 14696]
  • Loading branch information
lucboudreau committed Oct 18, 2011
1 parent 5d11e75 commit 5387a5a
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/main/mondrian/rolap/RolapResultShepherd.java
Expand Up @@ -53,24 +53,6 @@ class RolapResultShepherd {
private static final List<Pair<FutureTask<Result>, Execution>> tasks =
new CopyOnWriteArrayList<Pair<FutureTask<Result>,Execution>>();

static {
Runtime.getRuntime().addShutdownHook(
new Thread(
new Runnable() {
public void run() {
for (Pair<FutureTask<Result>, Execution> task
: tasks)
{
if (task.right.isCancelOrTimeout()) {
task.left.cancel(true);
task.right.cleanStatements();
}
}
executor.shutdownNow();
}
}));
}

/*
* Fire up the shepherd thread.
*/
Expand Down

0 comments on commit 5387a5a

Please sign in to comment.