ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jsr166e/ConcurrentHashMapV8.java
(Generate patch)

Comparing jsr166/src/jsr166e/ConcurrentHashMapV8.java (file contents):
Revision 1.25 by dl, Mon Sep 19 12:31:07 2011 UTC vs.
Revision 1.26 by jsr166, Wed Sep 21 11:42:08 2011 UTC

# Line 424 | Line 424 | public class ConcurrentHashMapV8<K, V>
424                              Thread.yield();  // heuristically yield mid-way
425                      }
426                      else if (casHash(h, h | WAITING)) {
427 <                        synchronized(this) {
427 >                        synchronized (this) {
428                              if (tabAt(tab, i) == this &&
429                                  (hash & WAITING) == WAITING) {
430                                  try {
# Line 571 | Line 571 | public class ConcurrentHashMapV8<K, V>
571                  } finally {                  // unlock and signal if needed
572                      if (!f.casHash(fh | LOCKED, fh)) {
573                          f.hash = fh;
574 <                        synchronized(f) { f.notifyAll(); };
574 >                        synchronized (f) { f.notifyAll(); };
575                      }
576                  }
577                  if (validated) {
# Line 639 | Line 639 | public class ConcurrentHashMapV8<K, V>
639                  } finally {
640                      if (!f.casHash(fh | LOCKED, fh)) {
641                          f.hash = fh;
642 <                        synchronized(f) { f.notifyAll(); };
642 >                        synchronized (f) { f.notifyAll(); };
643                      }
644                  }
645                  if (validated) {
# Line 682 | Line 682 | public class ConcurrentHashMapV8<K, V>
682                              setTabAt(tab, i, null);
683                          if (!node.casHash(fh, h)) {
684                              node.hash = h;
685 <                            synchronized(node) { node.notifyAll(); };
685 >                            synchronized (node) { node.notifyAll(); };
686                          }
687                      }
688                  }
# Line 731 | Line 731 | public class ConcurrentHashMapV8<K, V>
731                  } finally {
732                      if (!f.casHash(fh | LOCKED, fh)) {
733                          f.hash = fh;
734 <                        synchronized(f) { f.notifyAll(); };
734 >                        synchronized (f) { f.notifyAll(); };
735                      }
736                  }
737                  if (validated) {
# Line 780 | Line 780 | public class ConcurrentHashMapV8<K, V>
780                  } finally {
781                      if (!f.casHash(fh | LOCKED, fh)) {
782                          f.hash = fh;
783 <                        synchronized(f) { f.notifyAll(); };
783 >                        synchronized (f) { f.notifyAll(); };
784                      }
785                  }
786                  if (validated)
# Line 884 | Line 884 | public class ConcurrentHashMapV8<K, V>
884                      setTabAt(tab, i, fwd);
885                      if (!g.casHash(MOVED|LOCKED, MOVED)) {
886                          g.hash = MOVED;
887 <                        synchronized(g) { g.notifyAll(); }
887 >                        synchronized (g) { g.notifyAll(); }
888                      }
889                  }
890              }
# Line 922 | Line 922 | public class ConcurrentHashMapV8<K, V>
922                  } finally {
923                      if (!f.casHash(fh | LOCKED, fh)) {
924                          f.hash = fh;
925 <                        synchronized(f) { f.notifyAll(); };
925 >                        synchronized (f) { f.notifyAll(); };
926                      }
927                  }
928                  if (!validated)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines