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

minor refactoring

parent 86fd745d
No related branches found
No related tags found
No related merge requests found
......@@ -129,14 +129,15 @@ public final class Analysis implements UncaughtExceptionHandler {
newListener = factory.create();
switch (stage.getTerminationStrategy()) {
case BY_SIGNAL: {
final Thread thread = new Thread(new RunnableConsumerStage(stage, newListener));
final RunnableConsumerStage runnableConsumerStage = new RunnableConsumerStage(stage, newListener);
final Thread thread = new Thread(runnableConsumerStage);
stage.setOwningThread(thread);
this.consumerThreads.add(thread);
thread.setName(stage.getId());
break;
}
case BY_SELF_DECISION: {
RunnableProducerStage runnable = new RunnableProducerStage(stage, newListener);
final RunnableProducerStage runnable = new RunnableProducerStage(stage, newListener);
final Thread thread = new Thread(runnable);
stage.setOwningThread(thread);
this.finiteProducerThreads.add(thread);
......@@ -144,7 +145,7 @@ public final class Analysis implements UncaughtExceptionHandler {
break;
}
case BY_INTERRUPT: {
RunnableProducerStage runnable = new RunnableProducerStage(stage, newListener);
final RunnableProducerStage runnable = new RunnableProducerStage(stage, newListener);
final Thread thread = new Thread(runnable);
stage.setOwningThread(thread);
this.infiniteProducerThreads.add(thread);
......
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