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

Fix data race in loadAlignmentPatternLoc #104

Merged
merged 3 commits into from
Apr 10, 2024
Merged

Conversation

mnrtks
Copy link
Contributor

@mnrtks mnrtks commented Apr 9, 2024

fixed #103

@yeqown
Copy link
Owner

yeqown commented Apr 9, 2024

it looks good, and add a test case for it would be better. And further, is there a more performance way to resolve it? such as a precalculated state? reducing locked code block?

@mnrtks
Copy link
Contributor Author

mnrtks commented Apr 9, 2024

@yeqown
Thank you for your comment! I have added the tests for loadAlignmentPatternLoc with concurrent access.

And further, is there a more performance way to resolve it? such as a precalculated state? reducing locked code block?

Using a precalculated state could indeed be a more performance-efficient way to resolve this.

@yeqown
Copy link
Owner

yeqown commented Apr 10, 2024

@mnrtks If "pre-calculated state" is not planned by you or this PR, this PR will be accepted and merged.

@mnrtks
Copy link
Contributor Author

mnrtks commented Apr 10, 2024

@yeqown "pre-calculated state" is not planned in this PR.
Thank you.

@yeqown yeqown merged commit eab5cc3 into yeqown:main Apr 10, 2024
2 checks passed
alexballas pushed a commit to alexballas/go-qrcode that referenced this pull request May 25, 2024
* Fix data race in loadAlignmentPatternLoc

* Add test for loadAlignmentPatternLoc with concurrent access

* go test with -race flag
alexballas pushed a commit to alexballas/go-qrcode that referenced this pull request May 25, 2024
* Fix data race in loadAlignmentPatternLoc

* Add test for loadAlignmentPatternLoc with concurrent access

* go test with -race flag
alexballas pushed a commit to alexballas/go-qrcode that referenced this pull request May 25, 2024
* Fix data race in loadAlignmentPatternLoc

* Add test for loadAlignmentPatternLoc with concurrent access

* go test with -race flag
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.

[BUG] DATA RACE Issue When Calling qrcode.New from Multiple Goroutines
2 participants