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 MessageID Mutex #602

Merged
merged 2 commits into from Aug 1, 2022
Merged

Refactor MessageID Mutex #602

merged 2 commits into from Aug 1, 2022

Conversation

MattBrittan
Copy link
Contributor

Client has an anonymous sync.RWMutex. It also has an anonymous messageIds which itself has an anonymous sync.RWMutex. This complicates refactoring because if you remove Client.RWMutex everything appears to continue working but the mutex in messageIds is being called (unexpected behaviour so better to make things clear).

In addition a test was tidied up a bit.

As client embeds both messageIds, and an RWMutex, anonymously it was not obvious if calling `c.RLock()` accessed the directly embedded mutex or the one in messageIds. Changing this simplifies future refactoring.
@MattBrittan MattBrittan merged commit 34dc80e into eclipse:master Aug 1, 2022
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.

None yet

1 participant