re-ordered, send after enqueue, a slight conc bug would appear whereby the thread switch to watcher occurs after send (suppose) and then it locks list mjtex, seees no request, says it is an error, this ensures it is a request then sends it so when thread switch to watcher occurs, it MUST be in the list and therefore a valid request
This commit is contained in:
parent
7c44f04066
commit
b0b7f69778
|
@ -105,9 +105,6 @@ public final class Manager
|
|||
/* Construct the message array */
|
||||
byte[] messageData = dataMessage.encode();
|
||||
|
||||
/* Send the message */
|
||||
bSendMessage(socket, messageData);
|
||||
|
||||
/* Create a new Request */
|
||||
Request newRequest = new Request(tag);
|
||||
|
||||
|
@ -119,6 +116,9 @@ public final class Manager
|
|||
|
||||
/* Unlock the queue */
|
||||
unlockQueue();
|
||||
|
||||
/* Send the message */
|
||||
bSendMessage(socket, messageData);
|
||||
}
|
||||
|
||||
public bool isValidTag(ulong tag)
|
||||
|
|
Loading…
Reference in New Issue