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

#3122: Using of Synced #3123

Merged

Conversation

levBagryansky
Copy link
Member

@levBagryansky levBagryansky commented Apr 19, 2024

Closes #3122


PR-Codex overview

This PR introduces a new Synced scalar to synchronize access in DcsWithRuntime class.

Detailed summary

  • Added Synced scalar import
  • Wrapped Sticky scalar in Synced scalar for synchronization

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@levBagryansky
Copy link
Member Author

levBagryansky commented Apr 24, 2024

@yegor256 this case is similar to #3114. This bug is too difficult to show in tests, because this is Singleton + Sticky. However it has obvious cause: There are static Sticky objects that can be used by multiple threads. I have a test that fails if it was firtst, but the problem is that we cannot "reset" state of singleton to initial, and previous influence.

@levBagryansky
Copy link
Member Author

@yegor256 Let's just merge this fix

@yegor256
Copy link
Member

@rultor merge

@rultor
Copy link
Contributor

rultor commented Apr 24, 2024

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

@rultor rultor merged commit c76c1f5 into objectionary:master Apr 24, 2024
17 checks passed
@rultor
Copy link
Contributor

rultor commented Apr 24, 2024

@rultor merge

@yegor256 Done! FYI, the full log is here (took me 18min)

@levBagryansky levBagryansky deleted the 3122_DcsWithRuntime-safety branch April 25, 2024 06:49
@levBagryansky levBagryansky mentioned this pull request Apr 26, 2024
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.

DcsWithRuntime is thread-unsafe
3 participants