Hallo,
I am new to
Java and I am programming with multiple daemons are running parallel. I have one problem. i used each daemon with synchronization.master daemon is always waiting for data from slave daemons.
master daemon {
synchronized (datareceived) {
while(processrunning) {
datareceived.wait();
do some process with data
}
}
slave daemon1 {
synchronized (datareceived) {
while(processrunning) {
ReadData;
datareceived.notify();
}
}
slave daemon2 {
synchronized (datareceived) {
while(processrunning) {
ReadData;
datareceived.notify();
}
}
The problem is if master daemon is not at the position of wait and if one of slave did send notify(), then i am loosing the notification.
What I want is, i should not loose any notification. I should respond on each notification. So please let me know if somebody can help regarding
Thank you,
Regards,
Dimpu