mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
确保能同步取消定时器
This commit is contained in:
parent
341bb5d84a
commit
7272f01ea9
@ -70,7 +70,7 @@ public:
|
|||||||
|
|
||||||
void start(int ms ,EventPoller &poller){
|
void start(int ms ,EventPoller &poller){
|
||||||
weak_ptr<TimerForC> weak_self = shared_from_this();
|
weak_ptr<TimerForC> weak_self = shared_from_this();
|
||||||
poller.doDelayTask(ms, [weak_self](){
|
_task = poller.doDelayTask(ms, [weak_self]() {
|
||||||
auto strong_self = weak_self.lock();
|
auto strong_self = weak_self.lock();
|
||||||
if (!strong_self) {
|
if (!strong_self) {
|
||||||
return (uint64_t) 0;
|
return (uint64_t) 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user