Or with even less ambiguity: “Wait for notifications that were pending before this call to be processed.”
I don’t think this is a nano nit, important to be precise when describing interfaces. Also would prefer improving the handleNotifications docstring to highlight that there may be pending notifications when the handler is destroyed, referencing waitForNotifications. This might prevent similar issues in the future. For example:
0 //! Register handler for notifications. Some notifications are asynchronous
1 //! and may still execute after the handler is disconnected. Use
2 //! waitForNotifications() after the handler is disconnected to ensure all
3 //! pending notifications have been processed.
4 virtual std::unique_ptr<Handler> handleNotifications(std::shared_ptr<Notifications> notifications) = 0;
note: if no Notifications are registered, there can be no pending notifications, yet this will still block, so the docstring is still not entirely correct. But it’s consistent with pre-existing waitForNotificationsIfTipChanged, and I’m not sure there’s currenly a better approach without significant scope creep.