mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 16:26:11 +02:00
race condition first move the command in the rxQueue.
This commit is contained in:
parent
e4ff3089d4
commit
a9e9f9e92b
1 changed files with 5 additions and 5 deletions
|
@ -45,11 +45,6 @@ public class TxThread extends Thread {
|
||||||
if (cmd != null) {
|
if (cmd != null) {
|
||||||
// Give the command a token and increment.
|
// Give the command a token and increment.
|
||||||
cmd.setToken(token++);
|
cmd.setToken(token++);
|
||||||
// shove in the pipe
|
|
||||||
String str = cmd.toString();
|
|
||||||
OutputStream out = session.getChannelOutputStream();
|
|
||||||
out.write(str.getBytes());
|
|
||||||
out.flush();
|
|
||||||
// Move to the RxQueue only if we have
|
// Move to the RxQueue only if we have
|
||||||
// a valid token, this is to permit input(HACK!)
|
// a valid token, this is to permit input(HACK!)
|
||||||
// or commands that do not want to wait for responses.
|
// or commands that do not want to wait for responses.
|
||||||
|
@ -57,6 +52,11 @@ public class TxThread extends Thread {
|
||||||
CommandQueue rxQueue = session.getRxQueue();
|
CommandQueue rxQueue = session.getRxQueue();
|
||||||
rxQueue.addCommand(cmd);
|
rxQueue.addCommand(cmd);
|
||||||
}
|
}
|
||||||
|
// shove in the pipe
|
||||||
|
String str = cmd.toString();
|
||||||
|
OutputStream out = session.getChannelOutputStream();
|
||||||
|
out.write(str.getBytes());
|
||||||
|
out.flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue