Skip to content

Make Greetings generator counter thread-safe#1009

Merged
turbolent merged 1 commit intomasterfrom
holyfuchs/atomic-greeting-generator
Mar 20, 2026
Merged

Make Greetings generator counter thread-safe#1009
turbolent merged 1 commit intomasterfrom
holyfuchs/atomic-greeting-generator

Conversation

@holyfuchs
Copy link
Member

Replaces the plain int counter in the Greetings test generator with sync/atomic.Uint32 to make it safe for concurrent use.

@github-actions
Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link
Contributor

@janezpodhostnik janezpodhostnik left a comment

Choose a reason for hiding this comment

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

Looks good, but I am a bit curious in what situation you ran into concurrency issues here.

@holyfuchs
Copy link
Member Author

Looks good, but I am a bit curious in what situation you ran into concurrency issues here.

Was working on this: onflow/flow-cli#2299
realized tests fail with -race on main, and wanted to make sure the new stuff I am implementing doesn't have data races. Makes it much easier to test with this fixed!

@turbolent turbolent merged commit 74e1a69 into master Mar 20, 2026
5 checks passed
@turbolent turbolent deleted the holyfuchs/atomic-greeting-generator branch March 20, 2026 18:21
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.

3 participants