From c79ec2fcf3b9e708d2c730d88a1bdb08e4723043 Mon Sep 17 00:00:00 2001 From: Mike Spreitzer Date: Wed, 17 Jul 2019 01:49:52 -0400 Subject: [PATCH] Expanded comment on FairQueuingSystem::DoOnEmpty --- .../src/k8s.io/apiserver/pkg/server/filters/reqmgmt.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/staging/src/k8s.io/apiserver/pkg/server/filters/reqmgmt.go b/staging/src/k8s.io/apiserver/pkg/server/filters/reqmgmt.go index 6fa857f50af..ab3d60f21a4 100644 --- a/staging/src/k8s.io/apiserver/pkg/server/filters/reqmgmt.go +++ b/staging/src/k8s.io/apiserver/pkg/server/filters/reqmgmt.go @@ -68,7 +68,13 @@ type FairQueuingSystem interface { SetRequestWaitLimit(time.Duration) // DoOnEmpty records a function to be called when all the queues - // have no requests waiting nor executing + // have no requests waiting nor executing. The filter uses this + // for a priority level that has become undesired, setting a + // callback that will actually remove the priority level by + // establishing a new RMState whose priorityLevelStates map lacks + // that entry. If the priority level becomes desired again before + // this is called, the filter cancels by calling `DoOnEmpty(nil)`. + // The callback is invoked with no mutexes locked. DoOnEmpty(func()) // Wait, in the happy case, shuffle shards the given request into