* Renamed m_mappingMutex to m_mappingPtrMutex for a little bit more clarity. * Added an m_bSendInhibit flag (setSendInhibit(bool)) that prevents a race condition when the MIDI scripting engine tries to send a message while we're shutting it down.
/** Mutex to protect against concurrent access to member variables */
97
98
QMutex m_mutex;
98
/** Mutex to protect against concurrent access to m_pMidiMapping. */
99
QMutex m_mappingMutex;
99
/** Mutex to protect against concurrent access to the m_pMidiMapping _pointer. Note that MidiMapping itself is thread-safe, so we just need to protect the pointer!. */
100
QMutex m_mappingPtrMutex;
100
101
/** A flag to inhibit the reception of messages from this device. This is used to prevent
101
102
a race condition when a MIDI message is received and looked up in the MidiMapping while
102
103
the MidiMapping is being modified (and is already locked). */
103
104
bool m_bReceiveInhibit;
105
/** A flag to inhibit the sending of MIDI messages to the MIDI device.
106
Similar to the above flag, this prevents race conditions,
107
particularly one where the scripting engine tries to send a
108
MIDI message while we're trying to shut it down. See