-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resolve mingw-related build issues by updating windows
crate
#152
Comments
@Boddlnagg do you know why this is happening only for winrt? Just based on the types involved, I'm guessing
|
All right, this was simpler than I thought. We no longer need to turn the midi ports into IClosable to close. The |
* Mutexes in Windows are re-entrant, but `std::sync::Mutex` is not. * If a sysex message is inbound when closing a MIDI input windows will hang because part of the call to `midiInReset` will cause the input handler to fire, but the `HMIDIIN` lock was already taken before that handler attempts to take the lock a second time. * All of this takes place in a single thread, so there's no risk in allowing the lock to be taken twice. * `parking_lot::ReentrantMutex` is used in place of `Mutex`. * This change should behave more like `rtmidi` (which some of this code is based on) as `rtmidi` is also using a re-entrant mutex. * Tested on Windows 10, and issue appears resolved. * Update `windows` from `0.43` to `0.56` to resolve mingw-specific issues. * Minor changes to `winrt` code to accomodate update to `windows` crate. Fixes Boddlnagg#150 Fixes Boddlnagg#152
In what way does this relate to the build failures (timeouts) in #146 ? (The Edit: Is that exactly the hangs that are fixed by using reentrant mutexes? Edit2: No that cannot be, because the reentrant mutexes only affect the WinMM backend ... |
Hard to say. The I think the changes now in #151 would also resolve #146. It seems the build hangs for 0.54 (#146), but not for 0.56 (#151). #151 is ready to merge, and all tests/builds are passing (I got that fixed today). |
While working on #151, it was necessary to upgrade the version of the
windows
crate to resolve mingw-related issues. Unfortunately this causes problems in winrt builds:It's not clear why this is happening, but this work seems separate from solving the re-entrant locking issue in #150 .
The text was updated successfully, but these errors were encountered: