new mechanism for making sure there are only n jobs in the queue