[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sit-for and idle timers
From: |
Chong Yidong |
Subject: |
Re: sit-for and idle timers |
Date: |
Mon, 14 Aug 2006 15:47:07 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> Why do these timer functions call sit-for? It is a strange thing for
> a timer to wait. It should reschedule itself instead. What are they
> really trying to do?
It varies from situation to situation. For example, jit-lock uses the
idle timer function jit-lock-stealth-fontify, which calls sit-for.
The goal, in that case, is to wait a certain amount of time between
fontifying chunks.
> I think the solution is to avoid calling timer_start_idle when
> read-event is given a non-nil SECONDS argument. What do people think?
>
> That is definitely not right. Emacs really is idle when it reads an event,
> even if there is a timeout.
>
> So my conclusion is that when read-event is called from an idle timer,
> it should not change the state to idle at the beginning, and it should
> not change the state away from idle at the end.
>
> Does this change fix it?
I already checked in a different change to keyboard.c before your
email came in. But I think your version makes more sense.
- sit-for and idle timers, Noah Friedman, 2006/08/11
- Re: sit-for and idle timers, Chong Yidong, 2006/08/11
- Re: sit-for and idle timers, Chong Yidong, 2006/08/14
- Re: sit-for and idle timers, Richard Stallman, 2006/08/14
- Re: sit-for and idle timers,
Chong Yidong <=
- Re: sit-for and idle timers, Chong Yidong, 2006/08/14
- Re: sit-for and idle timers, Richard Stallman, 2006/08/15
- Re: sit-for and idle timers, Chong Yidong, 2006/08/15
- Re: sit-for and idle timers, Richard Stallman, 2006/08/16
- Re: sit-for and idle timers, Chong Yidong, 2006/08/16