Bugfixing

This commit is contained in:
Jens Schuhmann 2023-11-20 17:56:37 +01:00
parent 6ae236facd
commit 1e899d7e62
4 changed files with 6 additions and 7 deletions

View File

@ -53,7 +53,7 @@ public class Generator1 implements Runnable // Callable
laufend = true; laufend = true;
synchronized (LOCK) synchronized (LOCK)
{ {
LOCK.notify(); LOCK.notifyAll();
} }
@ -82,7 +82,7 @@ public class Generator1 implements Runnable // Callable
{ {
try try
{ {
lg.info("WAIT"); lg.info("WAIT_Gen1");
LOCK.wait(); LOCK.wait();
} }
catch (InterruptedException ex) catch (InterruptedException ex)

View File

@ -53,7 +53,7 @@ public class Generator2 implements Runnable // Callable
laufend = true; laufend = true;
synchronized (LOCK) synchronized (LOCK)
{ {
LOCK.notify(); LOCK.notifyAll();
} }
@ -82,7 +82,7 @@ public class Generator2 implements Runnable // Callable
{ {
try try
{ {
lg.info("WAIT"); lg.info("WAIT_Gen2");
LOCK.wait(); LOCK.wait();
} }
catch (InterruptedException ex) catch (InterruptedException ex)

View File

@ -53,7 +53,7 @@ public class Generator3 implements Runnable // Callable
laufend = true; laufend = true;
synchronized (LOCK) synchronized (LOCK)
{ {
LOCK.notify(); LOCK.notifyAll();
} }
@ -82,7 +82,7 @@ public class Generator3 implements Runnable // Callable
{ {
try try
{ {
lg.info("WAIT"); lg.info("WAIT_Gen3");
LOCK.wait(); LOCK.wait();
} }
catch (InterruptedException ex) catch (InterruptedException ex)

View File

@ -25,7 +25,6 @@ public class Zahlengenerator implements Subscriber<Integer[]> // Callable
{ {
private static Logger lg = OhmLogger.getLogger(); //Logger sollten immer static sein da sie für alle instanzen loggs ausführen private static Logger lg = OhmLogger.getLogger(); //Logger sollten immer static sein da sie für alle instanzen loggs ausführen
private int wert;
private Flow.Subscription subscription; private Flow.Subscription subscription;
private SubmissionPublisher<Integer[]> wertPublisher; private SubmissionPublisher<Integer[]> wertPublisher;