From 7272f01ea9422904a22227363e81037398b5cf08 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sun, 26 Apr 2020 19:36:17 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A1=AE=E4=BF=9D=E8=83=BD=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=AE=9A=E6=97=B6=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/source/mk_thread.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/source/mk_thread.cpp b/api/source/mk_thread.cpp index a28107a3..b73594e1 100644 --- a/api/source/mk_thread.cpp +++ b/api/source/mk_thread.cpp @@ -70,10 +70,10 @@ public: void start(int ms ,EventPoller &poller){ weak_ptr weak_self = shared_from_this(); - poller.doDelayTask(ms, [weak_self](){ + _task = poller.doDelayTask(ms, [weak_self]() { auto strong_self = weak_self.lock(); - if(!strong_self){ - return (uint64_t)0; + if (!strong_self) { + return (uint64_t) 0; } return (*strong_self)(); });