runtime: revise the documentation comments for netpoll

Supplement to CL 511455.

Updates #61454
This commit is contained in:
Shuo Wang 2024-10-18 10:49:13 +08:00
parent 70f4717e96
commit fe8fa18486
7 changed files with 24 additions and 7 deletions

View File

@ -31,7 +31,7 @@ import (
// poll without blocking. If delta > 0, block for up to delta nanoseconds.
// Return a list of goroutines built by calling netpollready,
// and a delta to add to netpollWaiters when all goroutines are ready.
// This will never return an empty list with a non-zero delta.
// This must never return an empty list with a non-zero delta.
//
// func netpollBreak()
// Wake up the network poller, assumed to be blocked in netpoll.

View File

@ -148,7 +148,10 @@ func netpollBreak() {
}
// netpoll checks for ready network connections.
// Returns list of goroutines that become runnable.
// Returns a list of goroutines that become runnable,
// and a delta to add to netpollWaiters.
// This must never return an empty list with a non-zero delta.
//
// delay < 0: blocks indefinitely
// delay == 0: does not block, just polls
// delay > 0: block for up to that many nanoseconds

View File

@ -89,7 +89,10 @@ func netpollBreak() {
}
// netpoll checks for ready network connections.
// Returns list of goroutines that become runnable.
// Returns a list of goroutines that become runnable,
// and a delta to add to netpollWaiters.
// This must never return an empty list with a non-zero delta.
//
// delay < 0: blocks indefinitely
// delay == 0: does not block, just polls
// delay > 0: block for up to that many nanoseconds

View File

@ -80,7 +80,10 @@ func netpollBreak() {
}
// netpoll checks for ready network connections.
// Returns list of goroutines that become runnable.
// Returns a list of goroutines that become runnable,
// and a delta to add to netpollWaiters.
// This must never return an empty list with a non-zero delta.
//
// delay < 0: blocks indefinitely
// delay == 0: does not block, just polls
// delay > 0: block for up to that many nanoseconds

View File

@ -215,7 +215,10 @@ func netpollBreak() {
}
// netpoll checks for ready network connections.
// Returns list of goroutines that become runnable.
// Returns a list of goroutines that become runnable,
// and a delta to add to netpollWaiters.
// This must never return an empty list with a non-zero delta.
//
// delay < 0: blocks indefinitely
// delay == 0: does not block, just polls
// delay > 0: block for up to that many nanoseconds

View File

@ -32,7 +32,9 @@ func netpollBreak() {
}
// Polls for ready network connections.
// Returns list of goroutines that become runnable.
// Returns a list of goroutines that become runnable,
// and a delta to add to netpollWaiters.
// This must never return an empty list with a non-zero delta.
func netpoll(delay int64) (gList, int32) {
// Implementation for platforms that do not support
// integrated network poller.

View File

@ -144,7 +144,10 @@ func netpollBreak() {
}
// netpoll checks for ready network connections.
// Returns list of goroutines that become runnable.
// Returns a list of goroutines that become runnable,
// and a delta to add to netpollWaiters.
// This must never return an empty list with a non-zero delta.
//
// delay < 0: blocks indefinitely
// delay == 0: does not block, just polls
// delay > 0: block for up to that many nanoseconds