Removes and cancels all known tasks, ignoring any exceptions.
Returns an exportable index (used by ForkJoinWorkerThread).
Doubles the capacity of array. Call either by owner or with lock held -- it is OK for base, but not top, to move while resizings are in progress.
Tries to poll and run AsynchronousCompletionTasks until none found or blocker is released
Tries to pop and run tasks within the target's computation until done, not found, or limit exceeded.
Returns true if owned and not known to be blocked.
Provides a more accurate estimate of whether this queue has any tasks than does queueSize, by checking whether a near-empty queue has at least one unclaimed task.
Version of push for shared queues. Call only with phase lock held. @return true if should signal work
Takes next task, if one exists, in order specified by mode.
Returns next task, if one exists, in order specified by mode.
Takes next task, if one exists, in FIFO order.
Pushes a task. Call only by owner in unshared queues.
Returns the approximate number of tasks in the queue.
Runs the given (stolen) task if nonnull, as well as remaining local tasks and others available from the given queue, up to bound n (to avoid infinite unfairness).
Tries to lock shared queue by CASing phase field.
Shared version of tryUnpush.
If present, removes task from queue and executes it.
Pops the given task only if it is at the current top.
Queues supporting work-stealing as well as external task submission. See above for descriptions and algorithms.