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

Refactor control messages + Stop handling #78

Merged
merged 1 commit into from
Jan 7, 2023
Merged

Conversation

karlseguin
Copy link
Owner

Move the control API shared between Cache and LayeredCache into its own struct. But keep the control logic handling separate - it requires access to the local values, like dropped and deleteItem.

Stop is now a control message. Channels are no longer closed as part of the stop process.

Move the control API shared between Cache and LayeredCache into its own struct.
But keep the control logic handling separate - it requires access to the local
values, like dropped and deleteItem.

Stop is now a control message. Channels are no longer closed as part of the stop
process.
@eli-darkly
Copy link
Contributor

@karlseguin I've rerun my tests using this commit of CCache, with the race detector enabled, and it's no longer flagging a race condition as it did before. I don't think I'll be able to offer any more useful commentary about these changes, and my code doesn't exercise a lot of CCache's features so my tests might not detect any other problems, but for what it's worth, it does seem better in that regard.

@karlseguin karlseguin merged commit 3505243 into master Jan 7, 2023
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