Permuations and blocking queue