src/share/classes/java/util/concurrent/ForkJoinWorkerThread.java

Print this page

        

@@ -190,11 +190,11 @@
      */
     private static final int MAXIMUM_QUEUE_CAPACITY = 1 << 24; // 16M
 
     /**
      * The work-stealing queue array. Size must be a power of two.
-     * Initialized when started (as oposed to when constructed), to
+     * Initialized when started (as opposed to when constructed), to
      * improve memory locality.
      */
     ForkJoinTask<?>[] queue;
 
     /**

@@ -358,11 +358,11 @@
      * threads work correctly even before this thread starts
      * processing tasks.
      */
     protected void onStart() {
         queue = new ForkJoinTask<?>[INITIAL_QUEUE_CAPACITY];
-        int r = pool.workerSeedGenerator.nextInt();
+        int r = ForkJoinPool.workerSeedGenerator.nextInt();
         seed = (r == 0) ? 1 : r; //  must be nonzero
     }
 
     /**
      * Performs cleanup associated with termination of this worker

@@ -982,11 +982,11 @@
 
     static {
         int s;
         try {
             UNSAFE = sun.misc.Unsafe.getUnsafe();
-            Class a = ForkJoinTask[].class;
+            Class<?> a = ForkJoinTask[].class;
             ABASE = UNSAFE.arrayBaseOffset(a);
             s = UNSAFE.arrayIndexScale(a);
         } catch (Exception e) {
             throw new Error(e);
         }