OneToOne diode is meant to be used by a single reader and a single writer. It is not thread safe if used otherwise.
| 31 | // OneToOne diode is meant to be used by a single reader and a single writer. |
| 32 | // It is not thread safe if used otherwise. |
| 33 | type OneToOne struct { |
| 34 | writeIndex uint64 |
| 35 | readIndex uint64 |
| 36 | buffer []unsafe.Pointer |
| 37 | alerter Alerter |
| 38 | } |
| 39 | |
| 40 | // NewOneToOne creates a new diode is meant to be used by a single reader and |
| 41 | // a single writer. The alerter is invoked on the read's go-routine. It is |
nothing calls this directly
no outgoing calls
no test coverage detected