microsoft / microsoft/vscode-python-environments
SimpleDebounce should be a disposable
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 138
- Forks
- 62
- Merge medio
- 1 d 4 h
- PR fusionados (30 d)
- 35
Descripción
This should be disposable:
https://github.com/microsoft/vscode-python-environments/blob/baad0daaa2e01f31ba507176e889bdfaf30d4cff/src/common/utils/debounce.ts#L1-L23
`dispose`'s impl should be:
```ts
public dispose() {
if (this.timeout) {
clearTimeout(this.timeout);
}
}
```
Not having this means that if the debouncer's job is done while the `setTimeout` is active, it will still fire again.
An example of this in practice is if the extension is disabled it should immediately dispose everything. Another example is the transient usage in https://github.com/microsoft/vscode-python-environments/pull/952
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Evaluación
Este issue todavía no se ha evaluado.