emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Clarification about auto-revert-mode and inotify


From: Dima Kogan
Subject: Re: Clarification about auto-revert-mode and inotify
Date: Tue, 21 Oct 2014 13:29:03 -0700

Eli Zaretskii <address@hidden> writes:

>> If we have inotify telling us when files are updated, then we don't NEED
>> to poll anything. This is in fact the whole point of inotify.
>
> What do you think happens when inotify sends its notification?  The
> notification will not be known to Emacs until Emacs reads from the
> file descriptor allocated for inotify's notifications.  And how does
> Emacs know it should read from that descriptor?  It polls it, together
> with the other descriptors.

I'm using Linux. I just did an strace, and it does not poll anything.
The main loop uses select() to look at a number of file descriptors, the
inotify one being just one of them. If there's nothing to do, emacs just
sits there in the select and does no work. This is as it should be.

Are you saying there's no cost to using the current code with a very low
timeout? If so, why is the default 5 seconds and not 0.01 seconds? If
emacs really is already churning when idle, why not lower the default?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]