Merge pull request #91174 from jqmichael/updateHasSyncDoc

Polished up comments around HasSynced()

Kubernetes-commit: e5ead81bb00379b0c889499a9e5aa69f031a122e
This commit is contained in:
Kubernetes Publisher 2020-05-19 15:22:48 -07:00
commit 55f6825a59
4 changed files with 7 additions and 7 deletions

2
Godeps/Godeps.json generated
View File

@ -436,7 +436,7 @@
}, },
{ {
"ImportPath": "k8s.io/api", "ImportPath": "k8s.io/api",
"Rev": "2543aba0e237" "Rev": "dccc90724807"
}, },
{ {
"ImportPath": "k8s.io/apimachinery", "ImportPath": "k8s.io/apimachinery",

4
go.mod
View File

@ -26,7 +26,7 @@ require (
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 golang.org/x/time v0.0.0-20191024005414-555d28b269f0
k8s.io/api v0.0.0-20200519082056-2543aba0e237 k8s.io/api v0.0.0-20200519082057-dccc90724807
k8s.io/apimachinery v0.0.0-20200519081849-bdcc9f4ab675 k8s.io/apimachinery v0.0.0-20200519081849-bdcc9f4ab675
k8s.io/klog/v2 v2.0.0 k8s.io/klog/v2 v2.0.0
k8s.io/utils v0.0.0-20200414100711-2df71ebbae66 k8s.io/utils v0.0.0-20200414100711-2df71ebbae66
@ -36,6 +36,6 @@ require (
replace ( replace (
golang.org/x/sys => golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a // pinned to release-branch.go1.13 golang.org/x/sys => golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a // pinned to release-branch.go1.13
golang.org/x/tools => golang.org/x/tools v0.0.0-20190821162956-65e3620a7ae7 // pinned to release-branch.go1.13 golang.org/x/tools => golang.org/x/tools v0.0.0-20190821162956-65e3620a7ae7 // pinned to release-branch.go1.13
k8s.io/api => k8s.io/api v0.0.0-20200519082056-2543aba0e237 k8s.io/api => k8s.io/api v0.0.0-20200519082057-dccc90724807
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20200519081849-bdcc9f4ab675 k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20200519081849-bdcc9f4ab675
) )

2
go.sum
View File

@ -284,7 +284,7 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
k8s.io/api v0.0.0-20200519082056-2543aba0e237/go.mod h1:Q6M7crZfx9Kr6X36KdNV/vN9ZDm0zhlCbCjafx7a6LY= k8s.io/api v0.0.0-20200519082057-dccc90724807/go.mod h1:Q6M7crZfx9Kr6X36KdNV/vN9ZDm0zhlCbCjafx7a6LY=
k8s.io/apimachinery v0.0.0-20200519081849-bdcc9f4ab675/go.mod h1:x4z2+k1N0YTBvV8PmaVs4/hSmKVVENZmTqI8gBygpLA= k8s.io/apimachinery v0.0.0-20200519081849-bdcc9f4ab675/go.mod h1:x4z2+k1N0YTBvV8PmaVs4/hSmKVVENZmTqI8gBygpLA=
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/klog/v2 v2.0.0 h1:Foj74zO6RbjjP4hBEKjnYtjjAhGg4jNynUdYF6fJrok= k8s.io/klog/v2 v2.0.0 h1:Foj74zO6RbjjP4hBEKjnYtjjAhGg4jNynUdYF6fJrok=

6
tools/cache/fifo.go vendored
View File

@ -71,8 +71,8 @@ type Queue interface {
// HasSynced returns true if the first batch of keys have all been // HasSynced returns true if the first batch of keys have all been
// popped. The first batch of keys are those of the first Replace // popped. The first batch of keys are those of the first Replace
// operation if that happened before any Add, Update, or Delete; // operation if that happened before any Add, AddIfNotPresent,
// otherwise the first batch is empty. // Update, or Delete; otherwise the first batch is empty.
HasSynced() bool HasSynced() bool
// Close the queue // Close the queue
@ -145,7 +145,7 @@ func (f *FIFO) Close() {
} }
// HasSynced returns true if an Add/Update/Delete/AddIfNotPresent are called first, // HasSynced returns true if an Add/Update/Delete/AddIfNotPresent are called first,
// or an Update called first but the first batch of items inserted by Replace() has been popped // or the first batch of items inserted by Replace() has been popped.
func (f *FIFO) HasSynced() bool { func (f *FIFO) HasSynced() bool {
f.lock.Lock() f.lock.Lock()
defer f.lock.Unlock() defer f.lock.Unlock()