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 * 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 * the result of the call. If there's currently no mutually recursive
* function call going on, this will return an `std::nullopt`, and the * 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. * @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 * 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 * functions passed by calls to `do_mutual_recursion_on_gui_thread()` and
* this thread until the original message we're trying to send has * `do_mutual_recursion_on_off_thread()` on this thread until we get a
* succeeded. This is a very specific solution to a very specific problem. * response back. This is a very specific solution to a very specific
* When a plugin wants to resize itself, it will call * problem. When a plugin wants to resize itself, it will call
* `IPlugFrame::resizeView()` from within the WIn32 message loop. The host * `IPlugFrame::resizeView()` from within the WIn32 message loop. The host
* will then call `IPlugView::onSize()` on the plugin's `IPlugView` to * will then call `IPlugView::onSize()` on the plugin's `IPlugView` to
* actually resize the plugin. The issue is that that call to * actually resize the plugin. The issue is that that call to
@@ -275,10 +275,6 @@ class Vst3Bridge : public HostBridge {
* context. * context.
* *
* We apply the same trick in `Vst3HostBridge`. * 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> template <typename T>
typename T::Response send_mutually_recursive_message(const T& object) { typename T::Response send_mutually_recursive_message(const T& object) {