From aa79c1f1c1d288e4cc2c0f4689ad01488678bf9d Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 4 Apr 2016 12:23:10 +0200 Subject: [PATCH] ae.c: comment to explain why we have a useless maxId check. --- src/ae.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ae.c b/src/ae.c index 79fcde62..bee9d4ad 100644 --- a/src/ae.c +++ b/src/ae.c @@ -303,7 +303,11 @@ static int processTimeEvents(aeEventLoop *eventLoop) { continue; } - /* Don't process time events created by time events in this iteration. */ + /* Make sure we don't process time events created by time events in + * this iteration. Note that this check is currently useless: we always + * add new timers on the head, however if we change the implementation + * detail, this check may be useful again: we keep it here for future + * defense. */ if (te->id > maxId) { te = te->next; continue;