MCPcopy
hub / github.com/NVIDIA/aistore / sentCallback

Method sentCallback

transport/obj_test.go:885–900  ·  view source on GitHub ↗
(hdr transport.ObjHdr, _ io.ReadCloser, _ interface{}, err error)

Source from the content-addressed store, hash-verified

883}
884
885func (rrc *randReaderCtx) sentCallback(hdr transport.ObjHdr, _ io.ReadCloser, _ interface{}, err error) {
886 if err != nil {
887 rrc.t.Errorf("sent-callback %d(%s) returned an error: %v", rrc.idx, hdr.FullName(), err)
888 }
889 rr := rrc.rr
890 if rr != nil {
891 rr.slab.Free(rr.buf)
892 }
893 rrc.mu.Lock()
894 rrc.posted[rrc.idx] = nil
895 if rrc.idx > 0 && rrc.posted[rrc.idx-1] != nil {
896 rrc.t.Errorf("sent-callback %d(%s) fired out of order", rrc.idx, hdr.FullName())
897 }
898 rrc.posted[rrc.idx] = nil
899 rrc.mu.Unlock()
900}

Callers

nothing calls this directly

Calls 4

LockMethod · 0.65
UnlockMethod · 0.65
FullNameMethod · 0.45
FreeMethod · 0.45

Tested by

no test coverage detected