Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change output buffer to setTimeout instead of setInterval #1123

Merged
merged 6 commits into from
Jul 5, 2022

Conversation

davegarthsimpson
Copy link
Contributor

@davegarthsimpson davegarthsimpson commented Jun 28, 2022

Motivation

To make the buffer mechanism of the output panel more robust.

Change description

Uses a setTimeout rather that setInterval in our buffer, this ensures that flush calls do not interfere with each other. On disposing our buffer we set a boolean flag to prevent additional setTimeout callbacks from being created, if there is a setTimeout callback in progress when the buffer is "disposed" it will complete before running flush a final time to be exhaustive.

gRPC errors are also added to the buffer, to ensure proper ordering in the output panel.

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Jun 28, 2022
@kittaakos
Copy link
Contributor

I proposed a few changes here. What do you think?

@davegarthsimpson
Copy link
Contributor Author

I proposed a few changes here. What do you think?

Great refactor, all LGTM

@kittaakos
Copy link
Contributor

@fstasi, please review. Thank you!

Copy link
Contributor

@AlbyIanna AlbyIanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor Author

@davegarthsimpson davegarthsimpson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note for traceability: changes in e5f922a were proposed/implemented by @kittaakos, then accepted and copied here by @davegarthsimpson.

@kittaakos
Copy link
Contributor

The PR looks good to me. Please proceed with the merge if this is ready. Thank you!

@davegarthsimpson davegarthsimpson merged commit 0b0958c into main Jul 5, 2022
@davegarthsimpson davegarthsimpson deleted the use-timeout-in-output-buffer branch July 5, 2022 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants