Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Raj committed Feb 5, 2024
1 parent 6b8f19f commit c86c03e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ async function* iterEnvsIterator(
if (isProgressEvent(event)) {
if (event.stage === ProgressReportStage.discoveryFinished) {
state.done = true;
// For super slow locators such as Windows registry, we expect updates even after discovery
// is "officially" finished, hence do not dispose listeners.
// listener.dispose();
} else {
didUpdate.fire(event);
Expand Down Expand Up @@ -122,7 +124,6 @@ function checkIfFinishedAndNotify(
) {
if (state.done && state.pending === 0) {
didUpdate.fire({ stage: ProgressReportStage.discoveryFinished });
// didUpdate.dispose();
traceVerbose(`Finished with environment reducer`);
state.done = false; // No need to notify again.
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ export class PythonEnvsResolver implements IResolvingLocator {
if (event.stage === ProgressReportStage.discoveryFinished) {
didUpdate.fire({ stage: ProgressReportStage.allPathsDiscovered });
state.done = true;
// For super slow locators such as Windows registry, we expect updates even after discovery
// is "officially" finished, hence do not dispose listeners.
// listener.dispose();
} else {
didUpdate.fire(event);
Expand Down Expand Up @@ -172,7 +174,6 @@ function checkIfFinishedAndNotify(
) {
if (state.done && state.pending === 0) {
didUpdate.fire({ stage: ProgressReportStage.discoveryFinished });
// didUpdate.dispose();
traceVerbose(`Finished with environment resolver`);
}
}
Expand Down

0 comments on commit c86c03e

Please sign in to comment.