I've added an extra thread to my application read from an alsa midi device,
and when I compile with any optimizations (gcc -O3 or gcc -O2) the
application "freezes" (meaning I don't know what code is still executing)
after the last of my threads (I have three, including the main thread).
This does not happen w/o optimizations.
Cheers