emacs-devel
[Top][All Lists]
Advanced

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

Re: Tramp with global-auto-revert-mode.


From: David Kastrup
Subject: Re: Tramp with global-auto-revert-mode.
Date: 14 May 2004 23:00:01 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

address@hidden (Kim F. Storm) writes:

> David Kastrup <address@hidden> writes:
> 
> > > be to have a global remote-busy-p flag that could be tested by
> > > async handlers doing file operations - and simply do nothing (in the
> > > present activation) if non-nil, i.e.
> > >
> > >         (unless remote-busy-p
> > >          ...).
> >
> > Do nothing?  How is the task accomplished then?
> 
> I was referring to repeating timers running async handlers related
> to things which are not really required to be run on every
> activation -- such as auto-revert.

Ah, ok.  But this sounds like one might have some sort of outstanding
operations (like saving buffers, auto-reverting or something) where a
later entry into the queue would just take a look of whether somebody
else is doing something similar or conflicting or overriding or
whatever, try to merge the operations somehow and consider both
finished together when they get done.  For example, if we have
creation/auto-save of a file pending in the queue, and then comes
deletion after it, we can just consider the creation/save finished.
I don't think one needs to bother about atomicity of requests: only
operations from different threads/timers/whatever can manage to
actually enter stuff into the queues, so there was no guarantee that
they were entered in a specific order, and you can just work them off
in any old order you like.

> A completely different approach would be to NOT run timers from a
> timer handler (which may happen because timers are too slow to
> execute).
> 
> To me, this spells troubles anyway...
> 
> I have installed a change to avoid running timers inside a timer.
> There may be problems with that change, but let's see if it has a
> positive effect on the current problems.

If a timer does something like accept-process-output, stopping other
timers would probably be a mistake.

We probably should not run one and the same timer while it has not
yet finished, but freeze different ones?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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