X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=shared%2Fmidi_device.h;h=5b1c3ade4c4ea8c884f9b131f5caa735b082268c;hb=448bfb337a97e9352b8d912749fcf0989e0eef25;hp=ec6bf9b5a160b5ededf14600744435a96ef0e951;hpb=7a702edcef2297bd19aef14ef5537a4fd6837607;p=nageru diff --git a/shared/midi_device.h b/shared/midi_device.h index ec6bf9b..5b1c3ad 100644 --- a/shared/midi_device.h +++ b/shared/midi_device.h @@ -60,8 +60,10 @@ private: std::atomic should_quit{false}; int should_quit_fd; - mutable std::recursive_mutex mu; // Recursive because the MIDI receiver may update_lights() back while we are sending it stuff. - MIDIReceiver *receiver; // Under . + // Recursive because the MIDI receiver may update_lights() back while we are sending it stuff. + // TODO: Do we need this anymore after receiver is not under the lock? + mutable std::recursive_mutex mu; + MIDIReceiver *receiver; // _Not_ under ; everything on it should be thread-safe. std::thread midi_thread; std::map current_light_status; // Keyed by note number. Under .