Move Scheduler::ServiceActor::set_queue to cpp.
This commit is contained in:
parent
e6c4bc6ca4
commit
071d50414d
@ -149,11 +149,12 @@ class Scheduler {
|
|||||||
class ServiceActor final : public Actor {
|
class ServiceActor final : public Actor {
|
||||||
public:
|
public:
|
||||||
void set_queue(std::shared_ptr<MpscPollableQueue<EventFull>> queues);
|
void set_queue(std::shared_ptr<MpscPollableQueue<EventFull>> queues);
|
||||||
void start_up() final;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<MpscPollableQueue<EventFull>> inbound_;
|
std::shared_ptr<MpscPollableQueue<EventFull>> inbound_;
|
||||||
bool subscribed_{false};
|
bool subscribed_{false};
|
||||||
|
|
||||||
|
void start_up() final;
|
||||||
void loop() final;
|
void loop() final;
|
||||||
void tear_down() final;
|
void tear_down() final;
|
||||||
};
|
};
|
||||||
|
@ -54,6 +54,10 @@ void Scheduler::set_scheduler(Scheduler *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() {
|
void Scheduler::ServiceActor::start_up() {
|
||||||
#if TD_THREAD_UNSUPPORTED || TD_EVENTFD_UNSUPPORTED
|
#if TD_THREAD_UNSUPPORTED || TD_EVENTFD_UNSUPPORTED
|
||||||
CHECK(!inbound_);
|
CHECK(!inbound_);
|
||||||
|
@ -27,11 +27,6 @@
|
|||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
|
||||||
/*** ServiceActor ***/
|
|
||||||
inline void Scheduler::ServiceActor::set_queue(std::shared_ptr<MpscPollableQueue<EventFull>> queues) {
|
|
||||||
inbound_ = std::move(queues);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*** EventGuard ***/
|
/*** EventGuard ***/
|
||||||
class EventGuard {
|
class EventGuard {
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user