Tracktion / tracktion_engine

Tracktion Engine module
Other
1.19k stars 151 forks source link

Replace TRACKTION_ASSERT_MESSAGE_THREAD with the JUCE rendition. #36

Closed jrlanglois closed 3 years ago

jrlanglois commented 3 years ago

See https://github.com/Tracktion/tracktion_engine/issues/34

This is simply a find/replace. JUCE's macro now offers a pointer check for the singleton instance as well.

FigBug commented 3 years ago

These aren't equivalent. TRACKTION_ASSERT_MESSAGE_THREAD is the same as JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED

drowaudio commented 3 years ago

I don't think these are identical as the Tracktion one will also return true if the current thread has a locked message manager. I think the equivalent would be JUCE_ASSERT_MESSAGE_MANAGER_IS_LOCKED.

But... I'm not sure if JUCE_ASSERT_MESSAGE_THREAD could be used instead. I'm just weary of changing existing behaviour (there's all sorts of stuff that happens when loading an Edit on a background thread that this could interact with).

jrlanglois commented 3 years ago

Good point about the macro not being equivalent - I did miss the *_IS_LOCKED version...