Skip to content

lru: remove mutex from lru cache#4226

Merged
aarzilli merged 1 commit into
go-delve:masterfrom
aarzilli:delocklru
Jan 7, 2026
Merged

lru: remove mutex from lru cache#4226
aarzilli merged 1 commit into
go-delve:masterfrom
aarzilli:delocklru

Conversation

@aarzilli
Copy link
Copy Markdown
Member

We only use the lru cache in contexts that are non-thread reentrant,
regardless. The mutex is superfluous (it was originally introduced by a
dependency update, originally the code used simplelru which did not
have a mutex).

Copy link
Copy Markdown
Member

@derekparker derekparker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@derekparker
Copy link
Copy Markdown
Member

There are tests which are now failing which test concurrent access to the cache. These will need to be removed.

We only use the lru cache in contexts that are non-thread reentrant,
regardless. The mutex is superfluous (it was originally introduced by a
dependency update, originally the code used simplelru which did not
have a mutex).
@aarzilli aarzilli merged commit efcc1fe into go-delve:master Jan 7, 2026
2 of 5 checks passed
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.

2 participants