Yeah this is exactly how you use the juce Thread
class!
I mean this: 404 - Missing Page - JUCE
I was under the impression that the scopedlock is just a handy front end for these.
thanks for confirming I have now understood correctly!
Yes @parenthetical, I think you are right. Those methods are just almost always being called by the ScopedLock, and thus it is easy to forget (or even realize) they were there.
However, before the ScopedLock was implemented, the enter() and exit() methods were those used to make sure that only one thread at a time could be executing the code contained between the enter() and exit() methods.
The ScopedLock is just a very convenient way to make sure that you never mismatch your pairs of enter() exit() calls
Yep you are absolutely right! I simply overlooked CriticalSection::enter()/exit() because I only ever used ScopedLock to lock/unlock them.