You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.Warnf(context.Background(), "unable to read token from cache but not failing the purge as the token might not have been saved at all. Error: %v", err)
// CondWait adds the current go routine to the condition waitlist and waits for another go routine to notify using CondBroadcast
58
+
// 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.
59
+
// It also locks the Locker in the condition variable as the semantics of Wait is that it unlocks the Locker after adding
60
+
// the consumer to the waitlist and before blocking on notification.
61
+
// We use the condLocker which is noOp locker to get added to waitlist for notifications.
62
+
// The underlying notifcationList doesn't need to be guarded as it implementation is atomic and is thread safe
63
+
// Refer https://go.dev/src/runtime/sema.go
64
+
// Following is the function and its comments
65
+
// notifyListAdd adds the caller to a notify list such that it can receive
66
+
// notifications. The caller must eventually call notifyListWait to wait for
67
+
// such a notification, passing the returned ticket number.
68
+
//
69
+
// func notifyListAdd(l *notifyList) uint32 {
70
+
// // This may be called concurrently, for example, when called from
71
+
// // sync.Cond.Wait while holding a RWMutex in read mode.
0 commit comments