Submitter s = submitters.get();
for (int r = s.seed, m = submitMask;;) {
WorkQueue[] ws; WorkQueue q;
int k = r & m & SQMASK; // use only even indices
if (runState < 0 || (ws = workQueues) == null || ws.length <= k)
throw new RejectedExecutionException(); // shutting down
else if ((q = ws[k]) == null) { // create new queue
WorkQueue nq = new WorkQueue(this, null, SHARED_QUEUE);
Mutex lock = this.lock; // construct outside lock
lock.lock();
try { // recheck under lock