Keep in mind that the timer callback function is executed on a worker thread, so you'll want to ensure that you have thread-safe access to the state object.
记住定时回调功能是在一个工作者线程上执行的,所以你必须确保访问state对象的线程安全。
2
These methods access the injected timer component directly.
这些方法可以直接访问被注入的计时器组件。
3
Obviously this means that the callback function will need to be able to access the timer object.