Permalink
Browse files

ensuring the thread ends before starting a new one

  • Loading branch information...
1 parent 05e6ac8 commit 39c1d05f7bffcca9f76f231befabf2fdb1da6e1f @calavera calavera committed Apr 27, 2010
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/main/java/org/jruby/trinidad/HotDeployObserver.java
@@ -86,6 +86,9 @@ private void restartApplicationContext() {
System.out.println("stoping " + applicationContext.getName());
((Lifecycle)applicationContext).stop();
+ // context.start runs a new thread so we are going to interrupt this one
+ interrupted = true;
+
for (Map.Entry<String, String> entry : parameters.entrySet()) {
// preventing duplicate parameters
if (applicationContext.findParameter(entry.getKey()) == null) {

0 comments on commit 39c1d05

Please sign in to comment.