queue_empty renamed to needs_work