Skip to content
Snippets Groups Projects
Commit a302e1da authored by Christian Wulf's avatar Christian Wulf
Browse files

added inc(counter) to SignalingCounter

parent ce6bb4ca
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,10 @@ public class DynamicActuator { ...@@ -31,6 +31,10 @@ public class DynamicActuator {
public Runnable startWithinNewThread(final Stage stage) { public Runnable startWithinNewThread(final Stage stage) {
Runnable runnable = wrap(stage); Runnable runnable = wrap(stage);
Thread thread = new Thread(runnable); Thread thread = new Thread(runnable);
stage.setOwningThread(thread);
stage.setExceptionHandler(null);
thread.start(); thread.start();
return runnable; return runnable;
} }
......
...@@ -206,7 +206,8 @@ class ThreadService extends AbstractService<ThreadService> { ...@@ -206,7 +206,8 @@ class ThreadService extends AbstractService<ThreadService> {
@Override @Override
void merge(final ThreadService source) { void merge(final ThreadService source) {
this.getThreadableStages().putAll(source.getThreadableStages()); threadableStages.putAll(source.getThreadableStages());
runnableCounter.inc(source.runnableCounter);
} }
SignalingCounter getRunnableCounter() { SignalingCounter getRunnableCounter() {
......
...@@ -60,4 +60,9 @@ public class SignalingCounter { ...@@ -60,4 +60,9 @@ public class SignalingCounter {
} }
} }
} }
public synchronized void inc(final SignalingCounter otherCounter) {
counter += otherCounter.counter;
conditionalNotifyAll(counter);
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment