Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7ee0f70

Browse files
committed
Revert "cache/dynacache: Prevent multiple concurrent resizes"
This reverts commit564bae0.Thinking about it, the above doesn't make any sense/having any effect.
1 parent564bae0 commit7ee0f70

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

‎cache/dynacache/dynacache.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,7 @@ func (o OptionsPartition) CalculateMaxSize(maxSizePerPartition int) int {
119119

120120
// A dynamic partitioned cache.
121121
typeCachestruct {
122-
mu sync.RWMutex
123-
resizeMu sync.Mutex
122+
mu sync.RWMutex
124123

125124
partitionsmap[string]PartitionManager
126125

@@ -232,12 +231,6 @@ func (c *Cache) Stop() {
232231
}
233232

234233
func (c*Cache)adjustCurrentMaxSize() {
235-
if!c.resizeMu.TryLock() {
236-
// Prevent multiple concurrent resizes.
237-
return
238-
}
239-
deferc.resizeMu.Unlock()
240-
241234
c.mu.RLock()
242235
deferc.mu.RUnlock()
243236

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp