Skip to content

Conversation

@jedib0t
Copy link
Owner

@jedib0t jedib0t commented Dec 23, 2025

Fixes race conditions in the progress package that were caught by the race detector.

The main issues were concurrent access to the output writer and tracker fields without proper synchronization. I've added mutex protection for the output writer and created accessor methods for tracker fields that handle the locking internally. Also fixed a missing mutex protection for the render context cancel call.

I also realized that make test-race was only running the progress demo, so I updated it to test all packages to catch these issues earlier.

All tests pass with the race detector enabled.

Fixes #399

@sonarqubecloud
Copy link

@jedib0t jedib0t merged commit f05e1de into main Dec 23, 2025
4 checks passed
@jedib0t jedib0t deleted the progress-readme branch December 23, 2025 13:48
@coveralls
Copy link

Pull Request Test Coverage Report for Build 20462348615

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 54 of 54 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 20360201120: 0.0%
Covered Lines: 4839
Relevant Lines: 4839

💛 - Coveralls

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.

Race conditions in progress package & tests

3 participants