Sync.prototype.dequeue = function (state) {
  return (this.queues[state] || []).splice(0)
}