VIPLock and about threading

I saw the following two lines in many member functions in Engine like Engine::bypassModule or Engine::randomizeModule. Am I assuming correctly that these member functions are supposed to be called from app-thread and they are for syncronization with the engine thread?

VIPLock vipLock(internal->vipMutex);
std::lock_guard<std::recursive_mutex> lock(internal->mutex);

This leads me to another question: When changing anything from Widget (e.g. in onHoverKey) in Module should I synchronize threads? My guess is the answer will be “it depends what you are doing”. How should I do it? Is there a module that implements it to have a look?

1 Like

@Vortico can you give a few hints on this topic?

After thinking about it for a while I conclude that the safe path is to use an additional parameter for “sending messages” from the app-world into the dsp-world. At least for non-atomic operations.