emacs-devel
[Top][All Lists]
Advanced

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

Re: Timers and sentinels


From: Eli Zaretskii
Subject: Re: Timers and sentinels
Date: Sun, 26 Sep 2010 09:20:30 -0400

> From: Lars Magne Ingebrigtsen <address@hidden>
> Date: Sun, 26 Sep 2010 13:56:20 +0200
> Mail-Copies-To: never
> 
> Uday S Reddy <address@hidden> writes:
> 
> > Whenever the "main" Emacs thread does an accept-process-output or
> > sit-for, timer tasks can run.  I was also bitten by this issue a few
> > times.  It is important that the timer tasks be short and refrain from
> > changing any important state that might affect the main thread.
> 
> Hm.  Yes, nothing will be preempted unless they call sit-for or
> accept-process-output or the like in the main thread, so it sounds
> unlikely that a timer task will be preempted unless the same occurs.
> Which it doesn't, so there must be a different kind of bug in the
> code... 

Before you conclude that your initial guess was wrong, there's one
more factor to consider: signals.  When a subprocess exits, Emacs gets
a SIGCHLD signal, which is an asynchronous event.  There are also the
SIGALRM signals caused by the hourglass-cursor feature.  Not sure if
this can explain the issue you are dealing with, but I though I'd
mention it just in case.



reply via email to

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