diff --git a/diode/internal/diodes/many_to_one.go b/diode/internal/diodes/many_to_one.go index 0f562f7..e94a788 100644 --- a/diode/internal/diodes/many_to_one.go +++ b/diode/internal/diodes/many_to_one.go @@ -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 } diff --git a/diode/internal/diodes/one_to_one.go b/diode/internal/diodes/one_to_one.go index aaf66d1..dd85ab0 100644 --- a/diode/internal/diodes/one_to_one.go +++ b/diode/internal/diodes/one_to_one.go @@ -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 }