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.
| 9 | // ManyToOne diode is optimal for many writers (go-routines B-n) and a single |
| 10 | // reader (go-routine A). It is not thread safe for multiple readers. |
| 11 | type ManyToOne struct { |
| 12 | writeIndex uint64 |
| 13 | readIndex uint64 |
| 14 | buffer []unsafe.Pointer |
| 15 | alerter Alerter |
| 16 | } |
| 17 | |
| 18 | // NewManyToOne creates a new diode (ring buffer). The ManyToOne diode |
| 19 | // is optimized for many writers (on go-routines B-n) and a single reader |
nothing calls this directly
no outgoing calls
no test coverage detected