any time you replace the reference to the queue, you should do a write lock.