-
-
Notifications
You must be signed in to change notification settings - Fork 388
Lockless FileExistsMap and position mapping #2442
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
Conversation
Succeeded ver (fromDynamic -> Just v) -> pure (Just (v, mappingForVersion allMappings file ver)) | ||
Stale del ver (fromDynamic -> Just v) -> pure (Just (v, maybe id addDelta del $ mappingForVersion allMappings file ver)) | ||
Succeeded ver (fromDynamic -> Just v) -> | ||
atomically $ Just . (v,) <$> mappingForVersion positionMapping file ver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use one transaction including these and the stuff on line 358? Hm, maybe readPersistent
gets in the way...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does
@@ -328,7 +328,6 @@ getIdeOptionsIO ide = do | |||
-- for the version of that value. | |||
lastValueIO :: IdeRule k v => ShakeExtras -> k -> NormalizedFilePath -> IO (Maybe (v, PositionMapping)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interestingly, I think this entire function is close to being in STM. Maybe just persistentKeys
blocking it. Not sure if that's desirable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this one is firmly in IO
5th instalment from #2357