From 0c14c3134146dee68422b64a0d707569f5214a7c Mon Sep 17 00:00:00 2001 From: pmahindrakar-oss Date: Thu, 23 May 2024 00:18:01 -0700 Subject: [PATCH] comments Signed-off-by: pmahindrakar-oss --- flyteidl/clients/go/admin/cache/token_cache_inmemory.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flyteidl/clients/go/admin/cache/token_cache_inmemory.go b/flyteidl/clients/go/admin/cache/token_cache_inmemory.go index 21e16787ed..703eb9555f 100644 --- a/flyteidl/clients/go/admin/cache/token_cache_inmemory.go +++ b/flyteidl/clients/go/admin/cache/token_cache_inmemory.go @@ -44,7 +44,8 @@ func (t *TokenCacheInMemoryProvider) Unlock() { t.mu.Unlock() } -// CondWait waits for the condition to be true. +// CondWait adds the current go routine to the condition waitlist and waits for another go routine to notify using CondBroadcast +// The current usage is that one who was able to acquire the lock using TryLock is the one who gets a valid token and notifies all the waitlist requesters so that they can use the new valid token. // It also locks the Locker in the condition variable as the semantics of Wait is that it unlocks the Locker after adding // the consumer to the waitlist and before blocking on notification. func (t *TokenCacheInMemoryProvider) CondWait() {