Skip to content

Conversation

@Hweinstock
Copy link
Contributor

@Hweinstock Hweinstock commented Jan 17, 2025

Problem

Right now PollingSet exposes both the add and the start methods. The start adds the item and starts the timer, while the add only adds the item.

This allows a consumer to create a non-empty PollingSet where the timer never started.

Solution

  • override the add method so that a consumer is forced to start the timer when adding items.

  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Hweinstock Hweinstock marked this pull request as ready for review January 17, 2025 19:39
@Hweinstock Hweinstock requested a review from a team as a code owner January 17, 2025 19:39
Copy link
Contributor

@justinmk3 justinmk3 left a comment

Choose a reason for hiding this comment

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

Nice!

@justinmk3
Copy link
Contributor

Overwrite the add method so that a consumer is forced to start the timer when adding items.

it's only overriding, right? "overwrite" makes me think of this.add = () => { ... } :)

@Hweinstock
Copy link
Contributor Author

Yes, only overriding. Updated the description to be more accurate.

@justinmk3 justinmk3 merged commit 825d2fc into aws:master Jan 22, 2025
26 checks passed
kevluu-aws pushed a commit to kevluu-aws/aws-toolkit-vscode that referenced this pull request Jan 23, 2025
## Problem
Right now `PollingSet` exposes both the `add` and the `start` methods.
The `start` adds the item and starts the timer, while the `add` only
adds the item.

This allows a consumer to create a non-empty `PollingSet` where the
timer never started.

## Solution
- override the add method so that a consumer is forced to start the
timer when adding items.
chungjac pushed a commit to chungjac/aws-toolkit-vscode that referenced this pull request Jan 24, 2025
## Problem
Right now `PollingSet` exposes both the `add` and the `start` methods.
The `start` adds the item and starts the timer, while the `add` only
adds the item.

This allows a consumer to create a non-empty `PollingSet` where the
timer never started.

## Solution
- override the add method so that a consumer is forced to start the
timer when adding items.
s7ab059789 pushed a commit to s7ab059789/aws-toolkit-vscode that referenced this pull request Feb 19, 2025
## Problem
Right now `PollingSet` exposes both the `add` and the `start` methods.
The `start` adds the item and starts the timer, while the `add` only
adds the item.

This allows a consumer to create a non-empty `PollingSet` where the
timer never started.

## Solution
- override the add method so that a consumer is forced to start the
timer when adding items.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants