Queue manager refactor to use the same self-pipe and main loop layout as the queue workers