addTimer 为什么是线程安全的,通过什么写法实现的? #662
sychen12345
started this conversation in
General
Replies: 1 comment
-
你可以先试试能不能复现你提到的问题。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
陈硕老师,请问下,你的定时器添加 addTimer()和addTimerInLoop(), 是怎么确保线程安全的,除了加了assertInLoopThread(),是io线程的检测,我不太理解,怎么确保这个io线程才能调用这两个方法,我如果一定要用 其他线程loop->addTimerInLoop()呢?
Beta Was this translation helpful? Give feedback.
All reactions