final void runWorker ( WorkQueue w ) { w . growArray ( ) ; // allocate queue int seed = w . hint ; // initially holds randomization hint int r = ( seed == 0 ) ? 1 : seed ; // avoid 0 for xorShift for ( ForkJoinTask < ? > t ; ; ) { if ( ( t = scan ( w , r ) ) != null ) w . runTask ( t ) ; else if ( ! awaitWork ( w , r ) ) break ; r ^= r << 13 ; r ^= r >>> 17 ; r ^= r << 5 ; // xorshift } }
Top - level runloop for workers called by ForkJoinWorkerThread . run .