When immediately closing a MidiInput after starting, the ALSA handle may be closed whilst the MidiInputThread is running and it polls a destroyed handle