Skip to content

Conversation

@miladev95
Copy link
Contributor

  • Do only one thing
  • Non breaking API changes
  • Tested

What did this pull request do?

Replaced mutex in internal/lru/lru.go with sync.RWMutex.
Switched read-only methods to use RLock/RUnlock: Contains, Peek, GetOldest, KeyValues, Keys, Values, Len.
No behavioral changes besides mutex usage.

@propel-code-bot
Copy link
Contributor

Switch LRU cache mutex to sync.RWMutex

Replaces the LRU.mu field with sync.RWMutex and updates read-only helpers to acquire RLock/RUnlock. No functional behavior changes are intended beyond improved read concurrency for the LRU cache.

Key Changes

• Replaced LRU.mu from sync.Mutex to sync.RWMutex in internal/lru/lru.go.
• Adjusted read-only methods (Contains, Peek, GetOldest, KeyValues, Keys, Values, Len) to use RLock/RUnlock.

Affected Areas

internal/lru/lru.go

This summary was automatically generated by @propel-code-bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant