]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: revise the documentation comments for netpoll
authorShuo Wang <wangshuo@kylinos.cn>
Fri, 18 Oct 2024 02:51:35 +0000 (02:51 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 21 Oct 2024 13:40:40 +0000 (13:40 +0000)
Supplement to CL 511455.

Updates #61454

Change-Id: I111cbf297dd9159cffba333d610a7a4542915c55
GitHub-Last-Rev: fe8fa184868d665a4d08d534d3bfb5ea446d12c0
GitHub-Pull-Request: golang/go#69900
Reviewed-on: https://go-review.googlesource.com/c/go/+/620495
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/runtime/netpoll.go
src/runtime/netpoll_aix.go
src/runtime/netpoll_epoll.go
src/runtime/netpoll_kqueue.go
src/runtime/netpoll_solaris.go
src/runtime/netpoll_stub.go
src/runtime/netpoll_windows.go

index 36b9edfe21780a650993574eac497faff33fe0ae..8d65a81edcefadc6fb937066514b15132f5629f8 100644 (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.
index 2df5a57111455d588aa4c0bdf3bb6aeec5f105f4..4cf34d1c611a8f88f56a06c68dfcc5cdbe7a562e 100644 (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
index ff6e0b5f89ccef5efea0293f9f7cdcf28324c2cd..c43bab08821559c48a66b7ca35fc22fcf2b0c6a2 100644 (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
index 6cd80d5c30d16e855c6b69b0814ae3bff1d5f676..ca7898205e0ad6749fbca127b169a6d3b3ea08ff 100644 (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
index fddc29000b78643b50ccb7cb8ca35f321d21ef4f..90459c08df544f920a36548bcf3ad7594f87753b 100644 (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
index c1bda3fa8b0d6690c25cde71080eed879717fe0f..dc5d708b4c5bce2d3fb6f39ea28c2c9854e1ab5d 100644 (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.
index c3c10af723794f257e31dc47a6b17d98efdb1bc5..fb35d41c0cac3927f98565e4f14f1220114c7ddd 100644 (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