Inline yield_scheduler.

This commit is contained in:
levlam 2022-10-01 01:30:39 +03:00
parent da886281f4
commit fd8c7534a4
3 changed files with 1 additions and 6 deletions

View File

@ -302,5 +302,4 @@ void send_event_later(ActorRef actor_ref, ArgsT &&...args) {
Scheduler::instance()->send<ActorSendType::Later>(actor_ref, std::forward<ArgsT>(args)...); Scheduler::instance()->send<ActorSendType::Later>(actor_ref, std::forward<ArgsT>(args)...);
} }
void yield_scheduler();
} // namespace td } // namespace td

View File

@ -87,7 +87,7 @@ void Scheduler::ServiceActor::loop() {
EventFull event = queue->reader_get_unsafe(); EventFull event = queue->reader_get_unsafe();
if (event.actor_id().empty()) { if (event.actor_id().empty()) {
if (event.data().empty()) { if (event.data().empty()) {
yield_scheduler(); Scheduler::instance()->yield();
} else { } else {
Scheduler::instance()->register_migrated_actor(static_cast<ActorInfo *>(event.data().data.ptr)); Scheduler::instance()->register_migrated_actor(static_cast<ActorInfo *>(event.data().data.ptr));
} }

View File

@ -375,8 +375,4 @@ ActorOwn<ActorT> register_existing_actor(unique_ptr<ActorT> actor_ptr) {
return Scheduler::instance()->register_existing_actor(std::move(actor_ptr)); return Scheduler::instance()->register_existing_actor(std::move(actor_ptr));
} }
inline void yield_scheduler() {
Scheduler::instance()->yield();
}
} // namespace td } // namespace td