queue.put_unique checks space properly.