You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling AlsaMidiInput.Dispose() or AlsaMidiInput.CloseInputAsync(), the underlying AlsaSequencer keeps a thread alive via a task running EventLoop() that never completes. In order to dispose properly, it should call AlsaSequencer.StopListening(), wait for the event loop to complete, then dispose the rest of the resources. It's important to wait for the event loop to finish before calling AlsaSequencer.Dispose(), because AlsaSequencer.Dispose() makes the event loop hang as it's polling for data. I am unable to compile the solution on my end on linux so I'm using reflection to perform these actions. By using this method, I can confirm that the thread is no longer alive after AlsaMidiInput.Dispose().
The text was updated successfully, but these errors were encountered:
When calling
AlsaMidiInput.Dispose()
orAlsaMidiInput.CloseInputAsync()
, the underlyingAlsaSequencer
keeps a thread alive via a task runningEventLoop()
that never completes. In order to dispose properly, it should callAlsaSequencer.StopListening()
, wait for the event loop to complete, then dispose the rest of the resources. It's important to wait for the event loop to finish before callingAlsaSequencer.Dispose()
, becauseAlsaSequencer.Dispose()
makes the event loop hang as it's polling for data. I am unable to compile the solution on my end on linux so I'm using reflection to perform these actions. By using this method, I can confirm that the thread is no longer alive afterAlsaMidiInput.Dispose()
.The text was updated successfully, but these errors were encountered: