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

JGRP-1414 Synchronizing on 'members' MessageDispatcher.cast() is a conte... #23

Merged
merged 1 commit into from Jan 14, 2012
Merged

JGRP-1414 Synchronizing on 'members' MessageDispatcher.cast() is a conte... #23

merged 1 commit into from Jan 14, 2012

Conversation

maniksurtani
Copy link
Contributor

@Sanne Sanne merged commit 7a9a81b into belaban:master Jan 14, 2012
@Sanne
Copy link
Collaborator

Sanne commented Jan 14, 2012

Looks good, I've merged it.

@belaban
Copy link
Owner

belaban commented Jan 14, 2012

Why don't we simply use a CopyOnWriteArrayList ?

@belaban
Copy link
Owner

belaban commented Jan 14, 2012

I actually found a better solution:

  • I made 'members' volatile: this means that reads and writes are separated by memory barriers
  • Asssigning can now simply be done: members=new HashSet(new_mbrs);

@maniksurtani
Copy link
Contributor Author

Better and better. :) Have either of you done any benchmarks with this
change?

On 14 January 2012 16:14, Bela Ban <
reply@reply.github.com

wrote:

I actually found a better solution:

  • I made 'members' volatile: this means that reads and writes are
    separated by memory barriers
  • Asssigning can now simply be done: members=new
    HashSet(new_mbrs);

Reply to this email directly or view it on GitHub:
#23 (comment)

Manik

Sent from my iPad 4 beta 3 with a telekinetic keyboard

@belaban
Copy link
Owner

belaban commented Jan 15, 2012

Nope, not yet.

@Sanne
Copy link
Collaborator

Sanne commented Jan 15, 2012

I would like to, but this won't make a difference in my current test scenario as JGroups is far from being the main bottleneck.

Hopefully by tonight it will be, so keep me updated I'd you have a patch (either final our a draft)

@belaban
Copy link
Owner

belaban commented Jan 15, 2012

If you check out the 3.x branch (JGroups_Branch_3_0), you'll get the change (2e18494).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants