If the user doesn't set a callback for RtMidiIn, MIDI messages are pushed to a ringbuffer (MidiQueue) and eventually popped in RtMidiIn::getMessage. However, MidiQueue itself is not threadsafe and there is no other kind of thread synchronization involved. This looks like a dangerous race condition to me.
AFAICT this concerns all platforms because the (unsafe) implementation of RtMidiIn::getMessage() is the same on all APIs.