-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
fix race condition when changing max #183
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Go Race Detector pointed out a data race between the methods ChangeMax64 and State or GetMax64. State already takes the lock, but others did not.
mxey
changed the title
fix race condition in ChangeMax64
fix race condition when changing max
May 7, 2024
thanks! |
renovate bot
referenced
this pull request
in nobl9/sloctl
May 20, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/schollz/progressbar/v3](https://github.com/schollz/progressbar) | `v3.14.2` -> `v3.14.3` | [![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fschollz%2fprogressbar%2fv3/v3.14.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fschollz%2fprogressbar%2fv3/v3.14.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fschollz%2fprogressbar%2fv3/v3.14.2/v3.14.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fschollz%2fprogressbar%2fv3/v3.14.2/v3.14.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>schollz/progressbar (github.com/schollz/progressbar/v3)</summary> ### [`v3.14.3`](https://github.com/schollz/progressbar/releases/tag/v3.14.3) [Compare Source](https://github.com/schollz/progressbar/compare/v3.14.2...v3.14.3) #### What's Changed - fix error return by [@​ttmars](https://github.com/ttmars) in [https://github.com/schollz/progressbar/pull/175](https://github.com/schollz/progressbar/pull/175) - fix Finish() should update state.currentBytes by [@​black-night-heron](https://github.com/black-night-heron) in [https://github.com/schollz/progressbar/pull/182](https://github.com/schollz/progressbar/pull/182) - fix race condition when changing max by [@​mxey](https://github.com/mxey) in [https://github.com/schollz/progressbar/pull/183](https://github.com/schollz/progressbar/pull/183) - fix: make elapsedTime option work in non-spinner mode by [@​wjf3121](https://github.com/wjf3121) in [https://github.com/schollz/progressbar/pull/184](https://github.com/schollz/progressbar/pull/184) #### New Contributors - [@​ttmars](https://github.com/ttmars) made their first contribution in [https://github.com/schollz/progressbar/pull/175](https://github.com/schollz/progressbar/pull/175) - [@​black-night-heron](https://github.com/black-night-heron) made their first contribution in [https://github.com/schollz/progressbar/pull/182](https://github.com/schollz/progressbar/pull/182) - [@​mxey](https://github.com/mxey) made their first contribution in [https://github.com/schollz/progressbar/pull/183](https://github.com/schollz/progressbar/pull/183) - [@​wjf3121](https://github.com/wjf3121) made their first contribution in [https://github.com/schollz/progressbar/pull/184](https://github.com/schollz/progressbar/pull/184) **Full Changelog**: schollz/progressbar@v3.14.2...v3.14.3 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/nobl9/sloctl). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjMuNSIsInVwZGF0ZWRJblZlciI6IjM3LjM2My41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJnb2xhbmciLCJyZW5vdmF0ZSJdfQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
kodiakhq bot
referenced
this pull request
in cloudquery/plugin-pb-go
Jun 1, 2024
…#330) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/schollz/progressbar/v3](https://github.com/schollz/progressbar) | require | patch | `v3.14.2` -> `v3.14.3` | --- ### Release Notes <details> <summary>schollz/progressbar (github.com/schollz/progressbar/v3)</summary> ### [`v3.14.3`](https://github.com/schollz/progressbar/releases/tag/v3.14.3) [Compare Source](https://github.com/schollz/progressbar/compare/v3.14.2...v3.14.3) #### What's Changed - fix error return by [@​ttmars](https://github.com/ttmars) in [https://github.com/schollz/progressbar/pull/175](https://github.com/schollz/progressbar/pull/175) - fix Finish() should update state.currentBytes by [@​black-night-heron](https://github.com/black-night-heron) in [https://github.com/schollz/progressbar/pull/182](https://github.com/schollz/progressbar/pull/182) - fix race condition when changing max by [@​mxey](https://github.com/mxey) in [https://github.com/schollz/progressbar/pull/183](https://github.com/schollz/progressbar/pull/183) - fix: make elapsedTime option work in non-spinner mode by [@​wjf3121](https://github.com/wjf3121) in [https://github.com/schollz/progressbar/pull/184](https://github.com/schollz/progressbar/pull/184) #### New Contributors - [@​ttmars](https://github.com/ttmars) made their first contribution in [https://github.com/schollz/progressbar/pull/175](https://github.com/schollz/progressbar/pull/175) - [@​black-night-heron](https://github.com/black-night-heron) made their first contribution in [https://github.com/schollz/progressbar/pull/182](https://github.com/schollz/progressbar/pull/182) - [@​mxey](https://github.com/mxey) made their first contribution in [https://github.com/schollz/progressbar/pull/183](https://github.com/schollz/progressbar/pull/183) - [@​wjf3121](https://github.com/wjf3121) made their first contribution in [https://github.com/schollz/progressbar/pull/184](https://github.com/schollz/progressbar/pull/184) **Full Changelog**: schollz/progressbar@v3.14.2...v3.14.3 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zODQuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM4NC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
kodiakhq bot
referenced
this pull request
in cloudquery/plugin-pb-go
Jul 1, 2024
…#351) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/schollz/progressbar/v3](https://github.com/schollz/progressbar) | require | patch | `v3.14.2` -> `v3.14.4` | --- ### Release Notes <details> <summary>schollz/progressbar (github.com/schollz/progressbar/v3)</summary> ### [`v3.14.4`](https://github.com/schollz/progressbar/releases/tag/v3.14.4) [Compare Source](https://github.com/schollz/progressbar/compare/v3.14.3...v3.14.4) #### What's Changed - fix: only fill the bar for spinners in Finish() by [@​black-night-heron](https://github.com/black-night-heron) in [https://github.com/schollz/progressbar/pull/188](https://github.com/schollz/progressbar/pull/188) **Full Changelog**: schollz/progressbar@v3.14.3...v3.14.4 ### [`v3.14.3`](https://github.com/schollz/progressbar/releases/tag/v3.14.3) [Compare Source](https://github.com/schollz/progressbar/compare/v3.14.2...v3.14.3) #### What's Changed - fix error return by [@​ttmars](https://github.com/ttmars) in [https://github.com/schollz/progressbar/pull/175](https://github.com/schollz/progressbar/pull/175) - fix Finish() should update state.currentBytes by [@​black-night-heron](https://github.com/black-night-heron) in [https://github.com/schollz/progressbar/pull/182](https://github.com/schollz/progressbar/pull/182) - fix race condition when changing max by [@​mxey](https://github.com/mxey) in [https://github.com/schollz/progressbar/pull/183](https://github.com/schollz/progressbar/pull/183) - fix: make elapsedTime option work in non-spinner mode by [@​wjf3121](https://github.com/wjf3121) in [https://github.com/schollz/progressbar/pull/184](https://github.com/schollz/progressbar/pull/184) #### New Contributors - [@​ttmars](https://github.com/ttmars) made their first contribution in [https://github.com/schollz/progressbar/pull/175](https://github.com/schollz/progressbar/pull/175) - [@​black-night-heron](https://github.com/black-night-heron) made their first contribution in [https://github.com/schollz/progressbar/pull/182](https://github.com/schollz/progressbar/pull/182) - [@​mxey](https://github.com/mxey) made their first contribution in [https://github.com/schollz/progressbar/pull/183](https://github.com/schollz/progressbar/pull/183) - [@​wjf3121](https://github.com/wjf3121) made their first contribution in [https://github.com/schollz/progressbar/pull/184](https://github.com/schollz/progressbar/pull/184) **Full Changelog**: schollz/progressbar@v3.14.2...v3.14.3 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuMyIsInVwZGF0ZWRJblZlciI6IjM3LjQyMS4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWVyZ2UiXX0=-->
kodiakhq bot
referenced
this pull request
in cloudquery/cloudquery
Jul 1, 2024
…#18437) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/schollz/progressbar/v3](https://github.com/schollz/progressbar) | require | patch | `v3.14.2` -> `v3.14.4` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>schollz/progressbar (github.com/schollz/progressbar/v3)</summary> ### [`v3.14.4`](https://github.com/schollz/progressbar/releases/tag/v3.14.4) [Compare Source](https://github.com/schollz/progressbar/compare/v3.14.3...v3.14.4) #### What's Changed - fix: only fill the bar for spinners in Finish() by [@​black-night-heron](https://github.com/black-night-heron) in [https://github.com/schollz/progressbar/pull/188](https://github.com/schollz/progressbar/pull/188) **Full Changelog**: schollz/progressbar@v3.14.3...v3.14.4 ### [`v3.14.3`](https://github.com/schollz/progressbar/releases/tag/v3.14.3) [Compare Source](https://github.com/schollz/progressbar/compare/v3.14.2...v3.14.3) #### What's Changed - fix error return by [@​ttmars](https://github.com/ttmars) in [https://github.com/schollz/progressbar/pull/175](https://github.com/schollz/progressbar/pull/175) - fix Finish() should update state.currentBytes by [@​black-night-heron](https://github.com/black-night-heron) in [https://github.com/schollz/progressbar/pull/182](https://github.com/schollz/progressbar/pull/182) - fix race condition when changing max by [@​mxey](https://github.com/mxey) in [https://github.com/schollz/progressbar/pull/183](https://github.com/schollz/progressbar/pull/183) - fix: make elapsedTime option work in non-spinner mode by [@​wjf3121](https://github.com/wjf3121) in [https://github.com/schollz/progressbar/pull/184](https://github.com/schollz/progressbar/pull/184) #### New Contributors - [@​ttmars](https://github.com/ttmars) made their first contribution in [https://github.com/schollz/progressbar/pull/175](https://github.com/schollz/progressbar/pull/175) - [@​black-night-heron](https://github.com/black-night-heron) made their first contribution in [https://github.com/schollz/progressbar/pull/182](https://github.com/schollz/progressbar/pull/182) - [@​mxey](https://github.com/mxey) made their first contribution in [https://github.com/schollz/progressbar/pull/183](https://github.com/schollz/progressbar/pull/183) - [@​wjf3121](https://github.com/wjf3121) made their first contribution in [https://github.com/schollz/progressbar/pull/184](https://github.com/schollz/progressbar/pull/184) **Full Changelog**: schollz/progressbar@v3.14.2...v3.14.3 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Go Race Detector pointed out a data race between
the methods ChangeMax64 and State or GetMax64.
State already takes the lock, but others did not.