Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-1414

Synchronizing on 'members' MessageDispatcher.cast() is a contention point

XMLWordPrintable

      MessageDispatcher.cast() synchronizes on members and copies it to a local collection if null is passed in as your destination list. This is a contention point if you have many concurrent threads attempting to cast() to the entire cluster, as they start queueing up at this point.

      Guarding members with a ReadWriteLock is probably a better approach, allowing members to be read safely and concurrently.

      However, since members is protected, I am not sure of the implications around this. But then again, there is no guarantee that subclasses/extensions synchronize on members anyway.

        1. TreeSet.png
          174 kB
          Manik Surtani

              manik_jira Manik Surtani (Inactive)
              manik_jira Manik Surtani (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: