all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Uday S Reddy <u.s.reddy@cs.bham.ac.uk>
To: emacs-devel@gnu.org
Subject: Re: Timers and sentinels
Date: Sun, 26 Sep 2010 12:09:23 +0100	[thread overview]
Message-ID: <i7n9l8$ktu$1@dough.gmane.org> (raw)
In-Reply-To: <m3iq1uorvp.fsf@quimbies.gnus.org>

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	other threads:[~2010-09-26 11:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-25 13:49 Timers and sentinels Lars Magne Ingebrigtsen
2010-09-26 11:09 ` Uday S Reddy [this message]
2010-09-26 11:56   ` Lars Magne Ingebrigtsen
2010-09-26 13:20     ` Eli Zaretskii
2010-09-26 13:24       ` Lars Magne Ingebrigtsen
2010-09-26 15:19         ` Helmut Eller
2010-09-26 18:36         ` Eli Zaretskii
2010-09-26 18:53           ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='i7n9l8$ktu$1@dough.gmane.org' \
    --to=u.s.reddy@cs.bham.ac.uk \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.