Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lock-less Values state #2429

Merged
merged 4 commits into from
Dec 3, 2021
Merged

lock-less Values state #2429

merged 4 commits into from
Dec 3, 2021

Conversation

pepeiborra
Copy link
Collaborator

@pepeiborra pepeiborra commented Dec 2, 2021

Third extract from #2357. This change removes the locking around the build cache by replacing it with an STM Map

Copy link
Member

@jneira jneira left a comment

Choose a reason for hiding this comment

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

lgtm

ghcide/src/Development/IDE/Core/Shake.hs Outdated Show resolved Hide resolved
ghcide/src/Development/IDE/Core/Shake.hs Outdated Show resolved Hide resolved
ghcide/src/Development/IDE/Core/Shake.hs Outdated Show resolved Hide resolved
ghcide/src/Development/IDE/Core/Shake.hs Outdated Show resolved Hide resolved
@pepeiborra pepeiborra merged commit 6c69e9d into master Dec 3, 2021
deleteValue ShakeExtras{dirtyKeys, state} key file = do
void $ modifyVar' state $ HMap.delete (toKey key file)
atomicModifyIORef_ dirtyKeys $ HSet.insert (toKey key file)
deleteValue ShakeExtras{dirtyKeys, state} key file = atomically $ do
Copy link
Collaborator

Choose a reason for hiding this comment

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

this one should maybe have got pushed to the call sites too? particularly paralleling setValues

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.

3 participants