Thread safety (general)


#1

Can i be sure that all (Juce-GUI) Callbacks inclusive Timer and other Message Callbacks will all run on that one Message-Thread?
(if i do not use extra threads)


#2

Yes. Certainly Timer, ChangeListener, AsyncUpdater etc. will all happen on the message thread. In fact I can’t think of any callbacks that won’t happen on the message thread… if there are any, I’m sure they’ll be clearly marked in the description.


#3

In linux, there’s a thread specific to trigger timer callback.
I don’t unwind the stack, but I think you’ve just locked the message thread lock and called the timers from here.


#4

No, the timer thread just waits until the appropriate time, then sends a message that actually does the callbacks.


#5

Ok, great. And the Value callback, do they also happen in the MM thread ?


#6

Yes, Values are asynchronous.