The gitlab runners where showing a few flaky crashes in e.g. tests: dmsynth:dmsynth dmusic:dmusic winmm:midi
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58233
This patch attempts to wait at the DRV_CLOSE call for the thread to finish.
-- v3: mmdevapi: Avoid race between main and notify thread.