If a criminal prosecution has been instituted against a person under the laws of this state and is still pending, the governor, in his discretion, subject to such criminal prosecution, either may surrender him on demand of the executive authority of another state or hold him until he has been tried and discharged or convicted and punished in this state.