[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Should `cancel-timer' use `delete' instead of `delq'?
From: |
Stefan Monnier |
Subject: |
Re: Should `cancel-timer' use `delete' instead of `delq'? |
Date: |
Tue, 05 Sep 2006 11:38:50 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> It's almost certainly intentional that it uses delq. A timer is a
> unique entity.
> If application code can create multiple timers and doesn't save all the
> corresponding cookies for deletion, it's obviously a bug in that
> application code.
While I somewhat agree with Miles, I also agree with Drew that it can lead
to undesirable situations where it's very difficult to return to a "normal"
session, other than by restarting Emacs.
I've been tempted to change timer-idle-list and timer-list so that they use
weak-pointers. I.e. if you don't hold on to your timer by storing it in
a global var or somesuch, then it'll get cancelled/destroyed at the next GC.
I think this could work if we only do it for timers that use `repeat'.
Stefan
- Should `cancel-timer' use `delete' instead of `delq'?, Drew Adams, 2006/09/04
- Re: Should `cancel-timer' use `delete' instead of `delq'?, Miles Bader, 2006/09/04
- Re: Should `cancel-timer' use `delete' instead of `delq'?,
Stefan Monnier <=
- RE: Should `cancel-timer' use `delete' instead of `delq'?, Drew Adams, 2006/09/05
- Re: Should `cancel-timer' use `delete' instead of `delq'?, Stefan Monnier, 2006/09/05
- RE: Should `cancel-timer' use `delete' instead of `delq'?, Drew Adams, 2006/09/05
- Re: Should `cancel-timer' use `delete' instead of `delq'?, Kevin Rodgers, 2006/09/05
- RE: Should `cancel-timer' use `delete' instead of `delq'?, Drew Adams, 2006/09/05
- Re: Should `cancel-timer' use `delete' instead of `delq'?, Miles Bader, 2006/09/05
- RE: Should `cancel-timer' use `delete' instead of `delq'?, Drew Adams, 2006/09/05
- Re: Should `cancel-timer' use `delete' instead of `delq'?, Miles Bader, 2006/09/05
- RE: Should `cancel-timer' use `delete' instead of `delq'?, Drew Adams, 2006/09/06
- Re: Should `cancel-timer' use `delete' instead of `delq'?, Miles Bader, 2006/09/06