Goal
Refactor TCP/UDP operation state handling to support safe concurrent operations by using per-operation completion/context instead of single shared mutable completion state.
Scope
In scope:
pkg/xev/tcp.go
pkg/xev/udp.go
pkg/cxev/tcp.go
pkg/cxev/udp.go
- related tests
Out of scope:
- changing the overall package split (
xev/cxev)
- adding new network protocol features
Problem Statement
TCPConn/UDPConn currently reuse single completion/callback fields across operations, which can cause callback ID overwrites and race-prone behavior under overlapping read/write/close sequences.
Definition of Done
Verification Commands
just check
just test-quick
go test ./pkg/xev -run 'TCP|UDP' -race -count=1
Performance and Latency Budget
- Throughput regression <= 3%.
- p99 latency regression <= 5%.
Worktree Branch Name
codex/issue-2-per-op-completion-tcp-udp
Goal
Refactor TCP/UDP operation state handling to support safe concurrent operations by using per-operation completion/context instead of single shared mutable completion state.
Scope
In scope:
pkg/xev/tcp.gopkg/xev/udp.gopkg/cxev/tcp.gopkg/cxev/udp.goOut of scope:
xev/cxev)Problem Statement
TCPConn/UDPConncurrently reuse single completion/callback fields across operations, which can cause callback ID overwrites and race-prone behavior under overlapping read/write/close sequences.Definition of Done
just checkpasses.just test-quickpasses.Verification Commands
Performance and Latency Budget
Worktree Branch Name
codex/issue-2-per-op-completion-tcp-udp