Copy queue to minimize lock time and prevent deadlocks.
Merge remote-tracking branch 'origin/master'