sassoftware / vscode-sas-extension

This SAS Extension for Visual Studio Code provides support for the SAS language, including features such as SAS syntax highlighting, code completion, hover help, code folding, outline, SAS code snippets and run SAS code.
https://sassoftware.github.io/vscode-sas-extension/
Apache License 2.0
121 stars 48 forks source link

fix: queue run code #1118

Closed scnwwu closed 3 months ago

scnwwu commented 3 months ago

Summary Fix #1022

During code executing, if 2 or more runCode calls happen, they're waiting for a same thing and will execute at same time.

The fix is to queue the runCode call, and also refactored the CodeRunner class to be a static module, as the execution has to be limited to 1 globally.

Note that the original runCode implementation was NOT changed at all except renamed to _runCode. It may not be obvious in the diff as the indentation was changed.

Testing Test case in #1022

tianliang657 commented 3 months ago

This issue is fixed in the playpen package, no other issues found.