perf: apply fieldalignement (#1284)
This commit is contained in:
parent
da1890380e
commit
9dd4de6f1f
27 changed files with 90 additions and 94 deletions
|
|
@ -13,13 +13,13 @@ func Zilch[T any]() T {
|
|||
// Impl is a lazy key->value map. It's a wrapper around a map and a mutex. If values exceed their time-to-live, they are pruned at Get time.
|
||||
type Impl[K comparable, V any] struct {
|
||||
data map[K]decayMapEntry[V]
|
||||
lock sync.RWMutex
|
||||
|
||||
// deleteCh receives decay-deletion requests from readers.
|
||||
deleteCh chan deleteReq[K]
|
||||
// stopCh stops the background cleanup worker.
|
||||
stopCh chan struct{}
|
||||
wg sync.WaitGroup
|
||||
lock sync.RWMutex
|
||||
}
|
||||
|
||||
type decayMapEntry[V any] struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue