Skip to content

Commit

Permalink
Slight tweak, plus add more commentary
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisVaughan committed Aug 8, 2024
1 parent 80f38f1 commit d9133f7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1940,7 +1940,9 @@ class PositronConsoleInstance extends Disposable implements IPositronConsoleInst
this._pendingInputState = 'Processing';

try {
return await this.processPendingInputImpl();
// Need to `await` inside the `try` so that the `finally` only runs once
// `processPendingInputImpl()` has completely finished. Can't just return the promise.
await this.processPendingInputImpl();
} finally {
this._pendingInputState = 'Idle';
}
Expand Down

0 comments on commit d9133f7

Please sign in to comment.