Separate mutual recursion on GUI and other threads

I wasn't able to get this to clash, but this way we can be 100% sure
that there aren't any weird issues.
This commit is contained in:
Robbert van der Helm
2021-04-29 12:07:11 +02:00
parent 8b168b310c
commit a495f1a67f
5 changed files with 106 additions and 70 deletions
@@ -46,8 +46,9 @@ Vst3PlugFrameProxyImpl::resizeView(Steinberg::IPlugView* /*view*/,
// We have to use this special sending function here so we can handle
// calls to `IPlugView::onSize()` from this same thread (the UI thread).
// See the docstring for more information.
return bridge.send_mutually_recursive_message(YaPlugFrame::ResizeView{
.owner_instance_id = owner_instance_id(), .new_size = *newSize});
return bridge.send_mutually_recursive_message<true>(
YaPlugFrame::ResizeView{.owner_instance_id = owner_instance_id(),
.new_size = *newSize});
} else {
std::cerr
<< "WARNING: Null pointer passed to 'IPlugFrame::resizeView()'"