Assign a thread_id for main thread.

This commit is contained in:
levlam 2021-11-17 13:24:19 +03:00
parent e9587a0083
commit 5491729a3c

View File

@ -37,6 +37,7 @@
#include "td/utils/misc.h"
#include "td/utils/OptionParser.h"
#include "td/utils/PathView.h"
#include "td/utils/port/detail/ThreadIdGuard.h"
#include "td/utils/port/IPAddress.h"
#include "td/utils/port/path.h"
#include "td/utils/port/rlimit.h"
@ -172,6 +173,7 @@ static void dump_statistics(const std::shared_ptr<SharedData> &shared_data,
int main(int argc, char *argv[]) {
SET_VERBOSITY_LEVEL(VERBOSITY_NAME(FATAL));
td::ExitGuard exit_guard;
td::detail::ThreadIdGuard thread_id_guard;
need_reopen_log.test_and_set();
need_quit.test_and_set();