Update documentation on mutual recursion functions

This commit is contained in:
Robbert van der Helm
2021-05-20 14:00:03 +02:00
parent a194765696
commit 626c31beb3
2 changed files with 6 additions and 10 deletions
+2 -2
View File
@@ -156,10 +156,10 @@ class Vst3PluginBridge : PluginBridge<Vst3Sockets<std::jthread>> {
/**
* If `send_mutually_recursive_message()` is currently being called, then
* run `cb` on the thread that's currently calling that function and return
* run `fn` on the thread that's currently calling that function and return
* the result of the call. If there's currently no mutually recursive
* function call going on, this will return an `std::nullopt`, and the
* caller should call `cb` itself.
* caller should call `fn` itself.
*
* @return The result of calling `fn`, if `fn` was called.
*
+4 -8
View File
@@ -254,10 +254,10 @@ class Vst3Bridge : public HostBridge {
/**
* Spawn a new thread and call `send_message()` from there, and then handle
* functions passed by calls to `do_mutual_recursion_on_gui_thread()` on
* this thread until the original message we're trying to send has
* succeeded. This is a very specific solution to a very specific problem.
* When a plugin wants to resize itself, it will call
* functions passed by calls to `do_mutual_recursion_on_gui_thread()` and
* `do_mutual_recursion_on_off_thread()` on this thread until we get a
* response back. This is a very specific solution to a very specific
* problem. When a plugin wants to resize itself, it will call
* `IPlugFrame::resizeView()` from within the WIn32 message loop. The host
* will then call `IPlugView::onSize()` on the plugin's `IPlugView` to
* actually resize the plugin. The issue is that that call to
@@ -275,10 +275,6 @@ class Vst3Bridge : public HostBridge {
* context.
*
* We apply the same trick in `Vst3HostBridge`.
*
* TODO: Maybe trim down the documentation for all of these mutual recursion
* functions now that we're handling the nasty bits in
* `MutualRecursionHelper`.
*/
template <typename T>
typename T::Response send_mutually_recursive_message(const T& object) {