为什么在 运行 循环事件序列中这些事件实际发生之前传送计时器和输入源的观察者通知

Why observer notifications for timer and input sources are delivered before those events actually occur in run loop sequence of events

我正在学习如何使用 NS运行Loop 并阅读有关 运行 Loops 章节的 Apple Doc。

我对文档如何描述 运行 循环事件序列的一些描述感到困惑

Because observer notifications for timer and input sources are delivered before those events actually occur, there may be a gap between the time of the notifications and the time of the actual events. If the timing between these events is critical, you can use the sleep and awake-from-sleep notifications to help you correlate the timing between the actual events

Here is doc link

它说计时器和输入源的观察者通知在这些事件实际发生之前传递。由于那些事件没有发生,运行 循环如何知道那些事件即将发生并提前发送这些事件的通知?

经过多次搜索,可能会有帮助。

文档在自定义输入源部分说明了以下内容。

In addition to defining the behavior of the custom source when an event arrives, you must also define the event delivery mechanism. This part of the source runs on a separate thread and is responsible for providing the input source with its data and for signaling it when that data is ready for processing. The event delivery mechanism is up to you but need not be overly complex.

More details link1 and link2

事件可能发生,但该事件可能尚未准备好使用,导致该事件产生的实际数据(在单独的线程上处理)可能不足以触发正在侦听该通知的线程。所以他们是 运行 循环发布的通知和完成的发生事件之间的差距。

还有其他进程会导致这种差距,例如定时器输入源等

谁有更好的解释?