Use a channel to exit