From 0d5a09e6155bfe92cd294749e64daae776e711b9 Mon Sep 17 00:00:00 2001 From: levlam Date: Sat, 3 Nov 2018 22:36:52 +0300 Subject: [PATCH] Fix ThreadPthread. GitOrigin-RevId: 3b16056894c33775dcf31146a87f1ab1c2ee13cc --- tdutils/td/utils/port/detail/ThreadPthread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdutils/td/utils/port/detail/ThreadPthread.h b/tdutils/td/utils/port/detail/ThreadPthread.h index dd3c144a4..ceab67fc0 100644 --- a/tdutils/td/utils/port/detail/ThreadPthread.h +++ b/tdutils/td/utils/port/detail/ThreadPthread.h @@ -36,6 +36,7 @@ class ThreadPthread { join(); is_inited_ = std::move(other.is_inited_); thread_ = other.thread_; + return *this; } template explicit ThreadPthread(Function &&f, Args &&... args) { @@ -82,7 +83,6 @@ class ThreadPthread { static void *run_thread(void *ptr) { ThreadIdGuard thread_id_guard; auto func = unique_ptr(static_cast(ptr)); - func->reset(); return nullptr; } };