mirror of
https://github.com/slackhq/nebula.git
synced 2026-08-15 09:57:00 +02:00
unslop some comments
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user