Skip to content

Commit c86c03e

Browse files
author
Kartik Raj
committed
Add comments
1 parent 6b8f19f commit c86c03e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/client/pythonEnvironments/base/locators/composite/envsReducer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ async function* iterEnvsIterator(
5555
if (isProgressEvent(event)) {
5656
if (event.stage === ProgressReportStage.discoveryFinished) {
5757
state.done = true;
58+
// For super slow locators such as Windows registry, we expect updates even after discovery
59+
// is "officially" finished, hence do not dispose listeners.
5860
// listener.dispose();
5961
} else {
6062
didUpdate.fire(event);
@@ -122,7 +124,6 @@ function checkIfFinishedAndNotify(
122124
) {
123125
if (state.done && state.pending === 0) {
124126
didUpdate.fire({ stage: ProgressReportStage.discoveryFinished });
125-
// didUpdate.dispose();
126127
traceVerbose(`Finished with environment reducer`);
127128
state.done = false; // No need to notify again.
128129
}

src/client/pythonEnvironments/base/locators/composite/envsResolver.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ export class PythonEnvsResolver implements IResolvingLocator {
8787
if (event.stage === ProgressReportStage.discoveryFinished) {
8888
didUpdate.fire({ stage: ProgressReportStage.allPathsDiscovered });
8989
state.done = true;
90+
// For super slow locators such as Windows registry, we expect updates even after discovery
91+
// is "officially" finished, hence do not dispose listeners.
9092
// listener.dispose();
9193
} else {
9294
didUpdate.fire(event);
@@ -172,7 +174,6 @@ function checkIfFinishedAndNotify(
172174
) {
173175
if (state.done && state.pending === 0) {
174176
didUpdate.fire({ stage: ProgressReportStage.discoveryFinished });
175-
// didUpdate.dispose();
176177
traceVerbose(`Finished with environment resolver`);
177178
}
178179
}

0 commit comments

Comments
 (0)