Move Scheduler::ServiceActor::set_queue to cpp.

This commit is contained in:
levlam 2021-10-25 08:33:14 +03:00
parent e6c4bc6ca4
commit 071d50414d
3 changed files with 6 additions and 6 deletions

View File

@ -149,11 +149,12 @@ class Scheduler {
class ServiceActor final : public Actor {
public:
void set_queue(std::shared_ptr<MpscPollableQueue<EventFull>> queues);
void start_up() final;
private:
std::shared_ptr<MpscPollableQueue<EventFull>> inbound_;
bool subscribed_{false};
void start_up() final;
void loop() final;
void tear_down() final;
};

View File

@ -54,6 +54,10 @@ void Scheduler::set_scheduler(Scheduler *scheduler) {
scheduler_ = scheduler;
}
void Scheduler::ServiceActor::set_queue(std::shared_ptr<MpscPollableQueue<EventFull>> queues) {
inbound_ = std::move(queues);
}
void Scheduler::ServiceActor::start_up() {
#if TD_THREAD_UNSUPPORTED || TD_EVENTFD_UNSUPPORTED
CHECK(!inbound_);

View File

@ -27,11 +27,6 @@
namespace td {
/*** ServiceActor ***/
inline void Scheduler::ServiceActor::set_queue(std::shared_ptr<MpscPollableQueue<EventFull>> queues) {
inbound_ = std::move(queues);
}
/*** EventGuard ***/
class EventGuard {
public: