emacs-devel
[Top][All Lists]
Advanced

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

Re: Timers and sentinels


From: Uday S Reddy
Subject: Re: Timers and sentinels
Date: Sun, 26 Sep 2010 12:09:23 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4

On 9/25/2010 2:49 PM, Lars Magne Ingebrigtsen wrote:
I'm trying to track down a bug that's pretty elusive.  I may be looking
in the totally wrong place, but what seems to happen is that I have a
function (run from a timer) that alters some part of the Gnus article
buffer.  At the same time, there's an URL process filter/sentinel that's
being run, and inserts images asynchronously into the buffer.

Is it possible that the function that's being run from the timer is
being interrupted by the process filter/sentinel function?  I had half
imagined that all these "multi-threaded" functions were being run with,
er, "interrupts off", so to speak.

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.

The JUST-THIS-ONE argument of accept-process-output can be used to "turn off the interrupts", so to speak.

Cheers,
Uday




reply via email to

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