Subject: Re: bug#12447: 24.1.50; Stuck in garbage collection on OS X

From: Eli Zaretskii <[email-masked]>
Date: Sun, 16 Sep 2012 14:53:22 +0300

> Date: Sun, 16 Sep 2012 14:44:30 +0400
> From: Dmitry Gutov <[email-masked]>
> CC: [email-masked], [email-masked]
> 
> 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?