Réglage blocage des threads des SBE : Les SBE attendaient d'être réveillé doublement pour reprendre le travaille
This commit is contained in:
parent
d680a85bf2
commit
dfde37e482
@ -114,6 +114,7 @@ public class StoreProcessor extends Thread implements AutoCloseable {
|
|||||||
public void executeCommand(ProtocolWriter.ProtocolResult protocolResult) {
|
public void executeCommand(ProtocolWriter.ProtocolResult protocolResult) {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
this.protocolResult = protocolResult;
|
this.protocolResult = protocolResult;
|
||||||
|
System.out.println("Request wake up");
|
||||||
this.notify();
|
this.notify();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -125,7 +126,6 @@ public class StoreProcessor extends Thread implements AutoCloseable {
|
|||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
this.protocolResult = null;
|
this.protocolResult = null;
|
||||||
fileFrontEnd.onStoreAvailable(this, responseCommand);
|
fileFrontEnd.onStoreAvailable(this, responseCommand);
|
||||||
waitAction();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,6 +74,7 @@ public class StoreProcessorRepository implements AutoCloseable, MulticastSPR {
|
|||||||
@Override
|
@Override
|
||||||
public void assignTask(String stor, Task task) {
|
public void assignTask(String stor, Task task) {
|
||||||
StoreProcessor handler = findSBE(task);
|
StoreProcessor handler = findSBE(task);
|
||||||
|
System.out.println("Find stor : " + handler);
|
||||||
handler.executeCommand(task.getCommand());
|
handler.executeCommand(task.getCommand());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user