potential for bug

This commit is contained in:
JackDoan
2026-04-20 11:09:29 -05:00
parent 0f27b81f19
commit f34e8fe0e6
14 changed files with 77 additions and 6 deletions

View File

@@ -19,6 +19,12 @@ const defaultBatchBufSize = 65535
type Queue interface {
io.ReadWriteCloser
ReadBatch() ([][]byte, error)
// WriteReject writes a single packet that originated from the inside
// path (reject replies or self-forward) using scratch state distinct
// from Write, so it can run concurrently with Write on the same Queue
// without a data race. On backends without a shared-scratch Write, a
// trivial delegation to Write is acceptable.
WriteReject(p []byte) (int, error)
}
type Device interface {