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

Use the lock also when reading, in AdapterRegistry #1136

Merged
merged 1 commit into from
Mar 25, 2020
Merged

Conversation

olleolleolle
Copy link
Member

@olleolleolle olleolleolle commented Mar 25, 2020

Description

Adapter Registry stores information in "a thread-safe way" (using a synchronize block). But, when reading, it doesn't use the lock.

This PR tries to repair the issue reported in #1068, by using a synchronize block around the reading, too.

Todos

Remaining things

  • Tests
  • Document this kind of thing in the DEVELOP guide?
  • Perhaps have a concurrency label? Is that the right word?

Additional Notes

This was inspired by watching a video from RWC2019. Here it is: https://www.youtube.com/watch?v=qX_FRa43r4k

@olleolleolle
Copy link
Member Author

@ioquatix Hi 👋 ! Cool, I've taken the first step, now I guess the rest of the road is still to go.

@ioquatix
Copy link
Contributor

It looks okay to me but it's been a while.

Copy link
Member

@iMacTia iMacTia left a comment

Choose a reason for hiding this comment

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

The fix itself looks good.
Not sure there's much we can do on the tests side though

@olleolleolle olleolleolle merged commit f640122 into master Mar 25, 2020
@olleolleolle olleolleolle deleted the fix-1068 branch March 25, 2020 11:58
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