-
Notifications
You must be signed in to change notification settings - Fork 166
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
feat: 添加 MultipleBytes 实现多协程安全读写 #272
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
把线程安全的特征删掉,因为主要使用场景是单一 goroutine 内部。
而后使用装饰器模式额外提供一个线程安全的版本,你随便命名。
暴露一个 New 方法,参数是预期中的 slice 的数量,用于初始化你的 data 的容量。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
并发测试不用那么麻烦,我们基本上通过代码 review 来确认加锁解锁没有问题。
而且这么复杂的测试,我看上去也没啥效果,所以可以删了。
或者说,并发版本你只要保证代码覆盖率就可以了
No description provided.