use catch/throw to suspend the read_and_process loop