unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 17392@debbugs.gnu.org
Subject: bug#17392: 24.3.90; cursor blinks faster and faster
Date: Sat, 10 May 2014 15:32:10 +0300	[thread overview]
Message-ID: <83oaz5vmph.fsf@gnu.org> (raw)
In-Reply-To: <871tw150b9.fsf@web.de>

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: 17392@debbugs.gnu.org
> Date: Sat, 10 May 2014 13:40:26 +0200
> 
> > > So an idle blinking timer not in timer-idle-list is called from C
> > > with timer-event-handler.  At this point, there is already another
> > > blinking timer in timer-idle-list.
> >
> > So is there a blinking time in timer-idle-list, or isn't there?
> 
> There is one blinking timer in timer-idle-list.  But timer-event-handler
> is called with a different blinking timer that is not memq in
> timer-idle-list.

How can that happen?  The only place AFAIK that calls idle timers is
keyboard.c, and it takes the timers off timer-idle-list.  Since
Emacs's Lisp interpreter is single-threaded, how could the situation
you describe happen?

> It seems that the implementation detail you cited leads in our case to
> the revival of canceled timers although there haven't been activated
> from LISP?

Maybe so, but again, you'd need to describe a sequence of events that
could lead to this.  Every time timer_check is called, it starts by
copying the current value of timer-idle-list, and doesn't consider it
again until it processed that copy entirely.  The Lisp interpreter is
not called except when we call a timer function taken from the list.

So if a timer is canceled before timer_check is called, it will be
absent from the copy used by timer_check, and if it is canceled as
part of some timer's operation, it won't be there on the next
invocation of timer_check.  Right?  So how could a timer be revived if
it was canceled?  More to the point, which of the blink-cursor timers
could potentially cause this situation?

Is there a chance handle-focus-in is called asynchronously by a thread
other than the one which runs the Lisp interpreter?  I don't think so
(and if it did, it would be a very Bad Thing), but other than that,
how can you explain that a timer got off timer-idle-list while that
same timer was found in that same list by a C code which cannot be
preempted by any Lisp?





  reply	other threads:[~2014-05-10 12:32 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-03  1:44 bug#17392: 24.3.90; cursor blinks faster and faster Michael Heerdegen
2014-05-03 18:33 ` Michael Heerdegen
2014-05-03 22:29   ` Michael Heerdegen
2014-05-05 12:25     ` Stefan Monnier
2014-05-05 13:14       ` Lennart Borgman
2014-05-05 20:17       ` Michael Heerdegen
2014-05-05 23:07         ` Michael Heerdegen
2014-05-05 23:30           ` Michael Heerdegen
2014-05-06 21:20             ` Michael Heerdegen
2014-05-07  2:02           ` Stefan Monnier
2014-05-07  2:14             ` Michael Heerdegen
2014-05-07 13:15               ` Stefan Monnier
2014-05-08 16:52                 ` Michael Heerdegen
2014-05-08 17:04                   ` Eli Zaretskii
2014-05-08 17:09                   ` Lennart Borgman
2014-05-08 17:42                     ` Michael Heerdegen
2014-05-08 18:40                       ` Lennart Borgman
2014-05-10 10:34                 ` Michael Heerdegen
2014-05-10 11:06                   ` Eli Zaretskii
2014-05-10 11:40                     ` Michael Heerdegen
2014-05-10 12:32                       ` Eli Zaretskii [this message]
2014-05-10 16:16                         ` Eli Zaretskii
2014-05-11 11:09                           ` Michael Heerdegen
2014-05-11 16:40                             ` Eli Zaretskii
2014-05-13 16:04                               ` Michael Heerdegen
2014-05-13 17:50                                 ` Eli Zaretskii
2014-05-13 17:58                                   ` Lennart Borgman
2014-05-13 18:14                                     ` Eli Zaretskii
2014-05-13 18:25                                       ` Lennart Borgman
2014-05-13 18:44                                         ` Eli Zaretskii
2014-05-13 18:50                                           ` Lennart Borgman
2014-05-13 19:47                                             ` Eli Zaretskii
2014-05-13 20:10                                               ` Lennart Borgman
2014-05-14  2:40                                                 ` Eli Zaretskii
2014-05-13 20:22                                   ` Stefan Monnier
2014-05-14  2:43                                     ` Eli Zaretskii
2014-05-14 14:59                                       ` Eli Zaretskii
2014-05-14 15:36                                         ` Michael Heerdegen
2014-05-14 16:00                                           ` Michael Heerdegen
2014-05-14 16:13                                           ` Eli Zaretskii
2014-05-14 17:23                                             ` Michael Heerdegen
2014-05-14 18:15                                               ` Eli Zaretskii
2014-05-14 19:11                                                 ` Lennart Borgman
2014-05-14 19:30                                                   ` Eli Zaretskii
2014-05-14 20:17                                                     ` Lennart Borgman
2014-05-15  2:40                                                       ` Eli Zaretskii
2014-05-15  3:31                                                         ` Lennart Borgman
2014-05-15 17:04                                                           ` Eli Zaretskii
2014-05-15 19:11                                                             ` Lennart Borgman
2014-05-15 19:17                                                               ` Eli Zaretskii
2014-05-15 20:22                                                                 ` Lennart Borgman
2014-05-16  5:30                                                                   ` Eli Zaretskii
2014-05-16  8:41                                                                     ` Lennart Borgman
2014-05-15 20:34                                                                 ` Glenn Morris
2014-05-15 20:44                                                                   ` Lennart Borgman
2014-05-07  2:27             ` Michael Heerdegen
2014-05-07  3:01               ` Michael Heerdegen
2014-05-07 13:57             ` Nicolas Richard
2014-05-18 13:05 ` Stefan Monnier
2014-05-18 13:41   ` Michael Heerdegen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83oaz5vmph.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=17392@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).