HttpConnection: safe migrate between schedulers
GitOrigin-RevId: 2bcc79fc100613a86a8048a2c35e4791903ccb11
This commit is contained in:
parent
301d0577ba
commit
4d19016970
@ -190,5 +190,13 @@ void HttpConnectionBase::loop() {
|
||||
}
|
||||
}
|
||||
|
||||
void HttpConnectionBase::on_start_migrate(int32 sched_id) {
|
||||
Scheduler::unsubscribe(fd_.get_poll_info().get_pollable_fd_ref());
|
||||
}
|
||||
|
||||
void HttpConnectionBase::on_finish_migrate() {
|
||||
Scheduler::subscribe(fd_.get_poll_info().extract_pollable_fd(this));
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
} // namespace td
|
||||
|
@ -66,6 +66,9 @@ class HttpConnectionBase : public Actor {
|
||||
void timeout_expired() override;
|
||||
void loop() override;
|
||||
|
||||
void on_start_migrate(int32 sched_id) override;
|
||||
void on_finish_migrate() override;
|
||||
|
||||
virtual void on_query(unique_ptr<HttpQuery> query) = 0;
|
||||
virtual void on_error(Status error) = 0;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user