Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Пофиксена проблема неработающих контрольных значений при дебаге в многопоточной среде #1431

Merged
merged 2 commits into from
Aug 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/ScriptEngine/Machine/MachineInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ public IValue EvaluateInFrame(string expression, int frameId)
Module = code,
ThisScope = localScope,
Locals = Array.Empty<IVariable>(),
Scopes = CreateFrameScopes(selectedFrame.Scopes, localScope),
InstructionPointer = 0,
};
}
Expand Down Expand Up @@ -2496,10 +2497,8 @@ private ExecutionFrameInfo FrameInfo(StackRuntimeModule module, ExecutionFrame f
[ThreadStatic]
private static MachineInstance _currentThreadWorker;

private static void SetCurrentMachineInstance(MachineInstance inst)
{
_currentThreadWorker = inst;
}
public static void SetCurrentMachineInstance(MachineInstance current)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А public тут зачем?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Поддержу. Оно же не вызывается ниоткуда

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Пока искал проблему, видимо забыл убрать. Исправлю

=> _currentThreadWorker = current;

public static MachineInstance Current
{
Expand Down