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.71 by dl, Tue Oct 30 14:23:03 2012 UTC vs.
Revision 1.74 by jsr166, Tue Oct 30 16:54:26 2012 UTC

# Line 103 | Line 103 | import java.io.Serializable;
103   * does <em>not</em> allow {@code null} to be used as a key or value.
104   *
105   * <p>ConcurrentHashMapV8s support parallel operations using the {@link
106 < * ForkJoinPool#commonPool}. (Task that may be used in other contexts
106 > * ForkJoinPool#commonPool}. (Tasks that may be used in other contexts
107   * are available in class {@link ForkJoinTasks}). These operations are
108   * designed to be safely, and often sensibly, applied even with maps
109   * that are being concurrently updated by other threads; for example,
# Line 193 | Line 193 | import java.io.Serializable;
193   * processing are common but not guaranteed.  Operations involving
194   * brief functions on small maps may execute more slowly than
195   * sequential loops if the underlying work to parallelize the
196 < * computation is more expensive than the computation
197 < * itself. Similarly, parallelization may not lead to much actual
198 < * parallelism if all processors are busy performing unrelated tasks.
196 > * computation is more expensive than the computation itself.
197 > * Similarly, parallelization may not lead to much actual parallelism
198 > * if all processors are busy performing unrelated tasks.
199   *
200   * <p> All arguments to all task methods must be non-null.
201   *
# Line 4968 | Line 4968 | public class ConcurrentHashMapV8<K, V>
4968                      baseLimit = baseSize = t.length;
4969                  if (t != null) {
4970                      long n = m.counter.sum();
4971 <                    int par = (pool = getPool()) == null?
4971 >                    int par = ((pool = getPool()) == null) ?
4972                          ForkJoinPool.getCommonPoolParallelism() :
4973                          pool.getParallelism();
4974                      int sp = par << 3; // slack of 8

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines