[refactor] Make MainSignals RAII styled

This commit is contained in:
TheCharlatan
2023-11-27 11:46:36 +01:00
parent 84f5c135b8
commit 4abde2c4e3
5 changed files with 18 additions and 45 deletions

View File

@@ -160,13 +160,10 @@ private:
std::unique_ptr<MainSignalsImpl> m_internals;
public:
CMainSignals();
CMainSignals(CScheduler& scheduler LIFETIMEBOUND);
~CMainSignals();
/** Register a CScheduler to give callbacks which should run in the background (may only be called once) */
void RegisterBackgroundSignalScheduler(CScheduler& scheduler);
/** Unregister a CScheduler to give callbacks which should run in the background - these callbacks will now be dropped! */
void UnregisterBackgroundSignalScheduler();
/** Call any remaining callbacks on the calling thread */
void FlushBackgroundCallbacks();