Add required actor name to MultiTimeout.
GitOrigin-RevId: 918ad6358dd5c0056452df5da694e8b94c63a47a
This commit is contained in:
parent
c01dcf9a99
commit
b00a0b4ebb
@ -1098,8 +1098,8 @@ class ContactsManager : public Actor {
|
||||
vector<UserId> imported_contact_user_ids_; // result of change_imported_contacts
|
||||
vector<int32> unimported_contact_invites_; // result of change_imported_contacts
|
||||
|
||||
MultiTimeout user_online_timeout_;
|
||||
MultiTimeout channel_unban_timeout_;
|
||||
MultiTimeout user_online_timeout_{"UserOnlineTimeout"};
|
||||
MultiTimeout channel_unban_timeout_{"ChannelUnbanTimeout"};
|
||||
|
||||
class OnChatUpdate;
|
||||
};
|
||||
|
@ -145,7 +145,7 @@ class InlineQueriesManager : public Actor {
|
||||
int32 pending_request_count;
|
||||
};
|
||||
|
||||
MultiTimeout drop_inline_query_result_timeout_;
|
||||
MultiTimeout drop_inline_query_result_timeout_{"DropInlineQueryResultTimeout"};
|
||||
std::unordered_map<uint64, InlineQueryResult> inline_query_results_; // query_hash -> result
|
||||
|
||||
struct InlineMessageContent {
|
||||
|
@ -2914,16 +2914,16 @@ class MessagesManager : public Actor {
|
||||
std::unordered_map<DialogId, string, DialogIdHash> active_get_channel_differencies_;
|
||||
std::unordered_map<DialogId, uint64, DialogIdHash> get_channel_difference_to_logevent_id_;
|
||||
|
||||
MultiTimeout channel_get_difference_timeout_;
|
||||
MultiTimeout channel_get_difference_retry_timeout_;
|
||||
MultiTimeout pending_message_views_timeout_;
|
||||
MultiTimeout pending_draft_message_timeout_;
|
||||
MultiTimeout pending_read_history_timeout_;
|
||||
MultiTimeout pending_updated_dialog_timeout_;
|
||||
MultiTimeout pending_unload_dialog_timeout_;
|
||||
MultiTimeout dialog_unmute_timeout_;
|
||||
MultiTimeout pending_send_dialog_action_timeout_;
|
||||
MultiTimeout active_dialog_action_timeout_;
|
||||
MultiTimeout channel_get_difference_timeout_{"ChannelGetDifferenceTimeout"};
|
||||
MultiTimeout channel_get_difference_retry_timeout_{"ChannelGetDifferenceRetryTimeout"};
|
||||
MultiTimeout pending_message_views_timeout_{"PendingMessageViewsTimeout"};
|
||||
MultiTimeout pending_draft_message_timeout_{"PendingDraftMessageTimeout"};
|
||||
MultiTimeout pending_read_history_timeout_{"PendingReadHistoryTimeout"};
|
||||
MultiTimeout pending_updated_dialog_timeout_{"PendingUpdatedDialogTimeout"};
|
||||
MultiTimeout pending_unload_dialog_timeout_{"PendingUnloadDialogTimeout"};
|
||||
MultiTimeout dialog_unmute_timeout_{"DialogUnmuteTimeout"};
|
||||
MultiTimeout pending_send_dialog_action_timeout_{"PendingSendDialogActionTimeout"};
|
||||
MultiTimeout active_dialog_action_timeout_{"ActiveDialogActionTimeout"};
|
||||
|
||||
Hints dialogs_hints_; // search dialogs by title and username
|
||||
|
||||
|
@ -253,7 +253,7 @@ class Td final : public NetQueryCallback {
|
||||
|
||||
int64 alarm_id_ = 1;
|
||||
std::unordered_map<int64, uint64> pending_alarms_;
|
||||
MultiTimeout alarm_timeout_;
|
||||
MultiTimeout alarm_timeout_{"AlarmTimeout"};
|
||||
|
||||
vector<std::pair<uint64, td_api::object_ptr<td_api::Function>>> pending_preauthentication_requests_;
|
||||
|
||||
|
@ -241,7 +241,7 @@ class WebPagesManager : public Actor {
|
||||
|
||||
std::unordered_map<string, WebPageId> url_to_web_page_id_;
|
||||
|
||||
MultiTimeout pending_web_pages_timeout_;
|
||||
MultiTimeout pending_web_pages_timeout_{"PendingWebPagesTimeout"};
|
||||
};
|
||||
|
||||
} // namespace td
|
||||
|
@ -83,8 +83,8 @@ class MultiTimeout final : public Actor {
|
||||
public:
|
||||
using Data = void *;
|
||||
using Callback = void (*)(Data, int64);
|
||||
MultiTimeout() {
|
||||
register_actor("MultiTimeout", this).release();
|
||||
explicit MultiTimeout(Slice name) {
|
||||
register_actor(name, this).release();
|
||||
}
|
||||
|
||||
void set_callback(Callback callback) {
|
||||
|
@ -25,7 +25,7 @@ TEST(MultiTimeout, bug) {
|
||||
|
||||
{
|
||||
auto guard = sched.get_current_guard();
|
||||
multi_timeout = std::make_unique<MultiTimeout>();
|
||||
multi_timeout = std::make_unique<MultiTimeout>("MultiTimeout");
|
||||
data.multi_timeout = multi_timeout.get();
|
||||
multi_timeout->set_callback([](void *void_data, int64 key) {
|
||||
auto &data = *static_cast<Data *>(void_data);
|
||||
|
Reference in New Issue
Block a user