PY-18029 Race condition on async value evaluation fixed

`myCallbackHashMap` with the freshly requested async evaluation sequence number was accessed in `returnFullValue()` method before putting this sequence value into the map in `loadAsyncVariablesValues()` method. This resulted in NPE after switching to the new fast Thrift transport.
This commit is contained in:
Alexander Koshevoy
2018-08-22 23:16:40 +03:00
parent f90b609594
commit 9d86c56529
@@ -544,11 +544,11 @@ public class PydevConsoleCommunication extends AbstractConsoleCommunication impl
evaluationExpressions.add(GetVariableCommand.composeName(asyncValue.getDebugValue()));
}
final int seq = getNextFullValueSeq();
myCallbackHashMap.put(seq, pyAsyncValues);
// @alexander todo add specific exception to the method (previously processed by `checkError()`)
myClient.loadFullValue(seq, evaluationExpressions);
myCallbackHashMap.put(seq, pyAsyncValues);
// @alexander todo it was expected here that `loadFullValue()` might return `List<PyDebugValue>` somehow...
}
// @alexander todo uncomment probably