internal void ExecuteText(string text, PythonEvaluationResultReprKind reprKind, PythonStackFrame pythonStackFrame, Action<PythonEvaluationResult> completion) { int executeId = _ids.Allocate(); DebugWriteCommand("ExecuteText to thread " + pythonStackFrame.Thread.Id + " " + executeId); lock (_pendingExecutes) { _pendingExecutes[executeId] = new CompletionInfo(completion, text, pythonStackFrame); } lock (_streamLock) { _stream.Write(ExecuteTextCommandBytes); _stream.WriteString(text); _stream.WriteInt64(pythonStackFrame.Thread.Id); _stream.WriteInt32(pythonStackFrame.FrameId); _stream.WriteInt32(executeId); _stream.WriteInt32((int)pythonStackFrame.Kind); _stream.WriteInt32((int)reprKind); } }
internal void ExecuteText(string text, JStackFrame jStackFrame, Action<JEvaluationResult> completion) { int executeId = _ids.Allocate(); DebugWriteCommand("ExecuteText to thread " + jStackFrame.Thread.Id + " " + executeId); lock (_pendingExecutes) { _pendingExecutes[executeId] = new CompletionInfo(completion, text, jStackFrame); } lock (_socketLock) { _stream.Write(ExecuteTextCommandBytes); _stream.WriteString(text); _stream.WriteInt64(jStackFrame.Thread.Id); _stream.WriteInt32(jStackFrame.FrameId); _stream.WriteInt32(executeId); _stream.WriteInt32((int)jStackFrame.Kind); } }