Skip to content

Commit

Permalink
fix(diode): atomic.AddUint64 in 32-bit cause panic (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdidierlaurent committed May 11, 2020
1 parent de5a95d commit e86e8f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion diode/internal/diodes/many_to_one.go
Expand Up @@ -9,9 +9,9 @@ import (
// ManyToOne diode is optimal for many writers (go-routines B-n) and a single
// reader (go-routine A). It is not thread safe for multiple readers.
type ManyToOne struct {
buffer []unsafe.Pointer
writeIndex uint64
readIndex uint64
buffer []unsafe.Pointer
alerter Alerter
}

Expand Down
2 changes: 1 addition & 1 deletion diode/internal/diodes/one_to_one.go
Expand Up @@ -31,9 +31,9 @@ type bucket struct {
// OneToOne diode is meant to be used by a single reader and a single writer.
// It is not thread safe if used otherwise.
type OneToOne struct {
buffer []unsafe.Pointer
writeIndex uint64
readIndex uint64
buffer []unsafe.Pointer
alerter Alerter
}

Expand Down

0 comments on commit e86e8f2

Please sign in to comment.