emacs-devel
[Top][All Lists]
Advanced

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

Re: call-process should not block process filters from running


From: Eli Zaretskii
Subject: Re: call-process should not block process filters from running
Date: Tue, 04 Jul 2023 20:14:06 +0300

> From: sbaugh@catern.com
> Date: Tue, 04 Jul 2023 12:53:52 -0400
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> >> From: sbaugh@catern.com
> >> Date: Tue, 04 Jul 2023 09:51:42 -0400
> >> 
> >> >Timer functions should also avoid calling functions that cause Emacs to
> >> >wait, such as ‘sit-for’ (*note Waiting::).  This can lead to
> >> >unpredictable effects, since other timers (or even the same timer) can
> >> >run while waiting.
> >> 
> >> But it seems that the "(or even the same timer)" part is not true in
> >> practice.  From looking at timer-event-handler this makes sense - it
> >> looks like we remove the timer from timer-list before running it.  So
> >> timers don't run concurrently with themselves.  Which since it's already
> >> the case, we might as well formalize, since it's useful for Lisp
> >> programmers...
> >
> > You cannot formalize that because a timer function can activate the
> > same timer again.
> 
> Sure, but that's an explicit opt-in to running the timer again.

The point is that someone else could opt-in to do so, out of control
of your Lisp.  That's why the manual mentions that.

> > Also, there's a window before timer-event-handler removes the time
> > during which the same timer can still run.
> 
> There are many ways to get rid of that window.

Not in Emacs Lisp, no.



reply via email to

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