transactions, get_emit_options(): close only when no emits are pending