Skip to content

Commit d87869a

Browse files
committed
Add comment about concurrent activateConsoleSession()
1 parent 9b86e5c commit d87869a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

extensions/positron-r/src/session-manager.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ export class RSessionManager implements vscode.Disposable {
9999
throw Error(`Foreground session with ID ${sessionId} must not be a background session.`);
100100
}
101101

102+
// Multiple `activateConsoleSession()` might run concurrently if the
103+
// `didChangeForegroundSession` event fires rapidly. We might want to queue
104+
// the handling.
102105
this._lastForegroundSessionId = session.metadata.sessionId;
103106
await this.activateConsoleSession(session, 'foreground session changed');
104107
}

0 commit comments

Comments
 (0)