I am new to JUCE, c++ and threading. Unsurprisingly I’m having trouble understanding the context to even start coding.
Should I learn c++11 threading or JUCE threading? why pros/cons? Are they compatible? will using c++ threading in a JUCE project cause problems? other discussions on this forum didn’t seem conclusive about that. ie here: Threading and wait/notify
Are there tutorials on threading in JUCE? so far the only resources I have found are the JUCE API documentation and the Multithreading demo in JuceDemo.
In general are there some tutorials missing, deprecated, or hidden? Posts on this forum and the tutorials here: https://www.juce.com/tutorials seem to mention other tutorials I can’t find. Were some out of date and removed?
I have the Concurrency in Action book http://www.cplusplusconcurrencyinaction.com/ and it seems like a good explanation of c++ threading in the little bit I’ve read so far, but I’m feeling the lack of an equivalent explanation of JUCE specific threading. It also looks to me as though the JUCE thread classes include features missing from c++ is that right?
Specifically I’m struggling with issues like: should my event handling object inherit from thread or contain a member object that is a thread? When run() calls other methods what determines which thread they run on? If the same methods are called from elsewhere do they run on a different thread?
Generally how does the thread structure relate to the class/object structure? it seems like it intersects it arbitrarily… and I can’t find an explanation of how.
I see lots of references to the “message thread” by which I presume is meant the default basic gui handling main application thread? but so far I haven’t found a direct discussion of what it is. shouldn’t that be part of the most basic tutorials?
I feel like I’ve missed some basic explanation I should have seen.