queues.get(nextQueueIndex++ % 4).add(task); should probably be queues.get(nextQueueIndex++ % queues.size()).add(task); completly untestet and no pushrequest (sry), but right now I get an IndexOutOfBoundsException for e.g. 3 threads0
queues.get(nextQueueIndex++ % 4).add(task);
should probably be
queues.get(nextQueueIndex++ % queues.size()).add(task);
completly untestet and no pushrequest (sry), but right now I get an IndexOutOfBoundsException for e.g. 3 threads0