Fix high-priority issues: concurrency safety, naming consistency, and… - #16
Merged
y001j merged 1 commit intoNov 12, 2025
Merged
Conversation
… error handling This commit addresses three critical issues identified in the code review: 1. Fix concurrent safety issue with global variable 'increase' - Changed from plain uint64 to atomic.Uint64 - Use atomic.Add(1) for thread-safe ID generation - Removed unnecessary panic recovery code 2. Fix package naming inconsistency in example/echoserver.go - Changed all 'UringNet' references to 'uringnet' (lowercase) - Ensures consistent package naming throughout the codebase 3. Add comprehensive error handling - Added new error types: ErrSocketCreation, ErrInvalidSocketFd, ErrRingSetup, ErrFileRegister - Updated New() function with proper error checking - Updated NewMany() function with proper error handling and validation - Updated SetLoops() to return error and validate inputs - Added error handling to echoserver example with usage instructions - Improved error messages with context using fmt.Errorf with %w These changes improve code reliability, maintainability, and user experience.
This file contains hidden or 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
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.
… error handling
This commit addresses three critical issues identified in the code review:
Fix concurrent safety issue with global variable 'increase'
Fix package naming inconsistency in example/echoserver.go
Add comprehensive error handling
These changes improve code reliability, maintainability, and user experience.