Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
Signed-off-by: pmahindrakar-oss <[email protected]>
  • Loading branch information
pmahindrakar-oss committed May 23, 2024
1 parent 834898a commit 0c14c31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flyteidl/clients/go/admin/cache/token_cache_inmemory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 0c14c31

Please sign in to comment.