|
From: | Dmitry Gutov |
Subject: | bug#12447: 24.1.50; Stuck in garbage collection on OS X |
Date: | Wed, 19 Sep 2012 20:21:32 +0400 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 |
On 19.09.2012 19:24, Eli Zaretskii wrote:
Date: Wed, 19 Sep 2012 13:54:39 +0400 From: Dmitry Gutov <dgutov@yandex.ru> CC: jan.h.d@swipnet.se, 12447@debbugs.gnu.org, hanche@math.ntnu.no On 19.09.2012 6:54, Eli Zaretskii wrote:I'll keep the workaround, though, as it reportedly also fixes the long-standing OS X freeze bug.What workaround is that?The one I posted in #12326: calling timer-activate-when-idle with nil DONT-WAIT argument.I don't think that's a workaround. I think that's what js2 should do, if (AFAIU) it wants the timer handler be invoked once, after Emacs has been idle for more than 1 sec.
Maybe, but run-with-idle-timer calls it with DONT-WAIT t, and js2-mode-reset-timer is only supposed to be called in response to some user action.
So with your patch, it works effectively the same either way. By the way, here's what run-with-idle-timer docstring says: "Perform an action the next time Emacs is idle for SECS seconds." Shouldn't this mean that it should also pass DONT-WAIT nil?Below that, the docstring mentions what will happen if Emacs has been idle for N seconds (N < SECS), but doesn't clarify that if N => SECS, it will fire immediately.
https://github.com/mooz/js2-mode/commit/b02f4a0d72d0e2087038fe891e2580c4505415efBtw, in this line: (timer-activate-when-idle timer nil))) I think you can lose the last argument, since it is optional anyway.
Sure, I wrote it that way just to be explicit.
[Prev in Thread] | Current Thread | [Next in Thread] |