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

synchronize while iterating over syncronizedList in CommandSend #3547

Closed
wants to merge 4 commits into from

Conversation

Outfluencer
Copy link
Collaborator

related to #3529

@@ -50,8 +50,12 @@ public void lastEntryDone()
ComponentBuilder builder = new ComponentBuilder( "" );
if ( !entry.getValue().isEmpty() )
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it be synchronised from here and also down below to when entry.getValue stops being used (ie put value in a local and synchronise it)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought it only needs to be synchronized while iterating, that is only the case in the joiner call

Copy link
Member

Choose a reason for hiding this comment

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

Well ordinarily getValue.isEmpty could change, but if this method is the last entry then that suggests no synchronisation is actually needed at all (although callback.count should be atomic?)

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