From 81cb9da8873042544cc50919dc4e0350aae1f7ea Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 7 Jan 2020 03:55:51 +0300 Subject: [PATCH] Make dh_config_mutex_ private. GitOrigin-RevId: c2f44bef27d294ec992d35030a36a76855056f44 --- td/telegram/Global.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/td/telegram/Global.h b/td/telegram/Global.h index cac749885..57bc289bc 100644 --- a/td/telegram/Global.h +++ b/td/telegram/Global.h @@ -314,10 +314,6 @@ class Global : public ActorContext { DcId get_webfile_dc_id() const; -#if !TD_HAVE_ATOMIC_SHARED_PTR - std::mutex dh_config_mutex_; -#endif - std::shared_ptr get_dh_config() { #if !TD_HAVE_ATOMIC_SHARED_PTR std::lock_guard guard(dh_config_mutex_); @@ -327,6 +323,7 @@ class Global : public ActorContext { return atomic_load(&dh_config_); #endif } + void set_dh_config(std::shared_ptr new_dh_config) { #if !TD_HAVE_ATOMIC_SHARED_PTR std::lock_guard guard(dh_config_mutex_); @@ -391,6 +388,7 @@ class Global : public ActorContext { int32 slow_net_scheduler_id_; std::atomic store_all_files_in_files_directory_{false}; + std::atomic server_time_difference_{0.0}; std::atomic server_time_difference_was_updated_{false}; std::atomic dns_time_difference_{0.0}; @@ -398,6 +396,10 @@ class Global : public ActorContext { std::atomic close_flag_{false}; std::atomic system_time_saved_at_{-1e10}; +#if !TD_HAVE_ATOMIC_SHARED_PTR + std::mutex dh_config_mutex_; +#endif + std::vector> net_stats_file_callbacks_; ActorId state_manager_;