/// <summary> /// Version for InnocuousForkJoinWorkerThread /// </summary> internal ForkJoinWorkerThread(ForkJoinPool pool, ThreadGroup threadGroup, AccessControlContext acc) : base(threadGroup, null, "aForkJoinWorkerThread") { U.putOrderedObject(this, INHERITEDACCESSCONTROLCONTEXT, acc); EraseThreadLocals(); // clear before registering this.Pool_Renamed = pool; this.WorkQueue = pool.RegisterWorker(this); }
internal readonly ForkJoinPool.WorkQueue WorkQueue; // work-stealing mechanics /// <summary> /// Creates a ForkJoinWorkerThread operating in the given pool. /// </summary> /// <param name="pool"> the pool this thread works in </param> /// <exception cref="NullPointerException"> if pool is null </exception> protected internal ForkJoinWorkerThread(ForkJoinPool pool) : base("aForkJoinWorkerThread") { // Use a placeholder until a useful name can be set in registerWorker this.Pool_Renamed = pool; this.WorkQueue = pool.RegisterWorker(this); }