Is the element currently being processed in a for loop, the head of the queue?
private Queue<User> users = new ConcurrentLinkedQueue<User>();
for(User u : users){
users.remove(); // <- is this removing the currently iterated element?
}
Or is using users.remove(u)
preferable here?