upd: change event bus

- Make `.subscribeOnce` return listener id
- Make `.cancel` and `.isCanceled` methods in `MscEvent` implemented
This commit is contained in:
Samsonium
2026-09-28 17:33:03 +03:00
parent 8ea4bf45ba
commit 1978a24d1e
2 changed files with 14 additions and 5 deletions
+2 -2
View File
@@ -48,9 +48,9 @@ MscEventBus::SubscriptionId MscEventBus::subscribe(const std::string &name, List
return _subscribe(name, std::move(listener), false);
}
void MscEventBus::subscribeOnce(const std::string &name, Listener listener)
MscEventBus::SubscriptionId MscEventBus::subscribeOnce(const std::string &name, Listener listener)
{
_subscribe(name, std::move(listener), true);
return _subscribe(name, std::move(listener), true);
}
bool MscEventBus::unsubscribe(SubscriptionId id)