unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 12447@debbugs.gnu.org, hanche@math.ntnu.no
Subject: bug#12447: 24.1.50; Stuck in garbage collection on OS X
Date: Sun, 16 Sep 2012 15:39:20 +0300	[thread overview]
Message-ID: <83wqzuqgzr.fsf@gnu.org> (raw)
In-Reply-To: <5055C0EB.3040908@yandex.ru>

> Date: Sun, 16 Sep 2012 16:07:07 +0400
> From: Dmitry Gutov <dgutov@yandex.ru>
> CC: hanche@math.ntnu.no, 12447@debbugs.gnu.org
> 
> >> Like I wrote in 12326, AFAICT, the problem is that timer_check_2 doesn't
> >> at any point check that Emacs is still idle. When run-with-idle-timer
> >> calls (timer-activate-when-idle timer t), the new timer is added to the
> >> list, timer_check_2 reaches is and runs it immediately because
> >> 'timer_idleness_start_time' still has the same value.
> >
> > If that is the problem, then perhaps having timer_check_2 work on a
> > copy of the list would solve the problem.  Did you try that?
> 
> I'm no C programmer, so I didn't try to fix it in C code. How would I 
> make a copy of a list there?

Using the Fcopy_sequence function, I'd think.  Use it at the beginning
of the function to set the value of 'idle_timers', instead of this
line:

    idle_timers = Vtimer_idle_list;

> But no, it probably won't: the "guilty" commit made timer_check_2 
> actually return 0 after a timer fires (keeping true to the comment above 
> it), so a local copy would serve no purpose.

timer_check_2 indeed returns, but then timer_check will call it again,
because it continues calling timer_check_2 in a loop, until there's no
ripe timer.

> Assuming it would've worked, though, wouldn't it make the second 
> argument to 'timer-activate-when-idle' useless?

It isn't useless, it just means a slight delay in the "now" part of
its doc string.






  reply	other threads:[~2012-09-16 12:39 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14 21:08 bug#12447: 24.1.50; Stuck in garbage collection on OS X Harald Hanche-Olsen
2012-09-15  9:55 ` Jan Djärv
2012-09-15 11:07   ` Harald Hanche-Olsen
2012-09-15 12:31     ` Eli Zaretskii
2012-09-15 13:19       ` Harald Hanche-Olsen
2012-09-15 13:56         ` Eli Zaretskii
2012-09-15 14:23           ` Harald Hanche-Olsen
2012-09-15 14:37             ` Eli Zaretskii
2012-09-15 18:59     ` Jan Djärv
2012-09-16  9:15 ` Dmitry Gutov
2012-09-16 10:31   ` Eli Zaretskii
2012-09-16 10:44     ` Dmitry Gutov
2012-09-16 11:53       ` Eli Zaretskii
2012-09-16 12:07         ` Dmitry Gutov
2012-09-16 12:39           ` Eli Zaretskii [this message]
2012-09-16 13:25             ` Dmitry Gutov
2012-09-16 13:47               ` Eli Zaretskii
2012-09-16 14:25                 ` Dmitry Gutov
2012-09-16 14:54                   ` Eli Zaretskii
2012-09-16 15:56                     ` Dmitry Gutov
2012-09-18 15:05                       ` Eli Zaretskii
2012-09-18 17:29                         ` Jan Djärv
2012-09-18 20:08                           ` Eli Zaretskii
2012-09-19  0:27                         ` Dmitry Gutov
2012-09-19  2:54                           ` Eli Zaretskii
2012-09-19  7:41                             ` Harald Hanche-Olsen
2012-09-19 15:21                               ` Eli Zaretskii
2012-09-19  9:54                             ` Dmitry Gutov
2012-09-19 15:24                               ` Eli Zaretskii
2012-09-19 16:21                                 ` Dmitry Gutov
2012-09-19 16:38                                   ` Eli Zaretskii
2012-09-19 18:29                                     ` Dmitry Gutov
2012-09-20  4:04                                     ` Chong Yidong
2012-09-20 16:01                                       ` Eli Zaretskii
2012-09-21  3:31                                         ` Chong Yidong
2012-09-21  7:14                                           ` Eli Zaretskii
2012-09-21  9:09                                             ` Chong Yidong
2012-09-21  9:54                                               ` Eli Zaretskii
2012-09-21 14:26                                                 ` Chong Yidong
2012-09-22 13:18                                                   ` Eli Zaretskii
2012-09-21 10:49                                               ` Dmitry Gutov

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=83wqzuqgzr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=12447@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=hanche@math.ntnu.no \
    /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).