unslop some comments

This commit is contained in:
JackDoan
2026-07-14 13:38:39 -05:00
parent 5631346b07
commit 37b924945d
7 changed files with 24 additions and 63 deletions
+3 -8
View File
@@ -12,15 +12,10 @@ import (
// blockOn parks the calling goroutine until fd is ready (events is POLLIN for
// reads, POLLOUT for writes) or shutdownFd signals teardown. It builds the
// pollfd array on the stack every call, so concurrent callers on the same
// Queue never share Revents storage: the previous shared-array implementation
// was a genuine Go data race when two writers parked in poll(2) at once (the
// kernel writing Revents while another goroutine zeroed it). Level-triggered
// events kept it from deadlocking, but it was still a race.
// Queue never share Revents storage.
//
// Poll(2) is looped over EINTR. err is checked before the Revents bits are
// trusted, since a failed poll may leave them bogus. Returns os.ErrClosed when
// shutdown was signaled (POLLIN on shutdownFd) or either fd reported a problem
// condition (POLLHUP|POLLNVAL|POLLERR).
// Returns os.ErrClosed when shutdown was signaled (POLLIN on shutdownFd)
// or either fd reported a problem condition (POLLHUP|POLLNVAL|POLLERR).
func blockOn(fd, shutdownFd int32, events int16) error {
const problemFlags = unix.POLLHUP | unix.POLLNVAL | unix.POLLERR
pfds := [2]unix.PollFd{