kevinjqliu commented on code in PR #702:
URL: https://github.com/apache/iceberg-go/pull/702#discussion_r2740032484
##########
internal/utils.go:
##########
@@ -164,12 +165,15 @@ func RecoverError(err *error) {
}
func Counter(start int) iter.Seq[int] {
+ var current atomic.Int64
+ current.Store(int64(start))
+
return func(yield func(int) bool) {
for {
- if !yield(start) {
+ if !yield(int(current.Load())) {
return
}
- start++
+ current.Add(1)
Review Comment:
this seems valid, @zeroshade wdyt?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]