for (ComputeTask task : readyTasks) should work just fine