- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for releases (0.24 sec)
-
internal/cachevalue/cache.go
}() } return v.v, v.e } // Get lock. Either we get it or we wait for it. t.updating.Lock() if time.Since(time.UnixMilli(t.lastUpdateMs.Load())) < ttl { // There is a new value, release lock and return it. v = t.valErr.Load() t.updating.Unlock() return v.v, v.e } t.update() v = t.valErr.Load() t.updating.Unlock() return v.v, v.e } func (t *Cache[T]) update() {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Mar 01 16:00:42 GMT 2024 - 4.2K bytes - Viewed (0)