MCPcopy
hub / github.com/rs/zerolog / OneToOne

Struct OneToOne

diode/internal/diodes/one_to_one.go:33–38  ·  view source on GitHub ↗

OneToOne diode is meant to be used by a single reader and a single writer. It is not thread safe if used otherwise.

Source from the content-addressed store, hash-verified

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.
33type 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected