ADD: support disable scheduling by manager
This commit is contained in:
parent
2141eb0c61
commit
c2a609c913
@ -139,6 +139,11 @@
|
||||
*/
|
||||
void _enableScheduling();
|
||||
|
||||
/**
|
||||
* @brief disable scheduling of this particpant through the EventManager::Manager
|
||||
*/
|
||||
void _disableScheduling();
|
||||
|
||||
/**
|
||||
* @brief check if the participant is scheduled by event manager
|
||||
*/
|
||||
|
@ -118,6 +118,14 @@ void EventManager::Participant::_enableScheduling()
|
||||
isScheduledByManager_=true;
|
||||
}
|
||||
|
||||
void EventManager::Participant::_disableScheduling() {
|
||||
if (manager_ == nullptr) {
|
||||
throw std::runtime_error("no event manager set yet");
|
||||
}
|
||||
manager_->unschedule(shared_from_this());
|
||||
isScheduledByManager_ = false;
|
||||
}
|
||||
|
||||
void EventManager::Participant::_subscribe(std::uint32_t type)
|
||||
{
|
||||
if (manager_ == nullptr)
|
||||
|
Loading…
Reference in New Issue
Block a user