GNU bug report logs - #8869
Unjustified selection time-out

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Wed, 15 Jun 2011 15:44:02 UTC

Severity: normal

Found in version 24.0.50

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #44 received at 8869 <at> debbugs.gnu.org (full text, mbox):

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: "8869 <at> debbugs.gnu.org" <8869 <at> debbugs.gnu.org>,
	David De La Harpe Golden <david <at> harpegolden.net>
Subject: Re: bug#8869: Unjustified selection time-out
Date: Mon, 20 Jun 2011 08:27:18 +0200

Chong Yidong skrev 2011-06-19 23.13:
> Jan Djärv<jan.h.d <at> swipnet.se>  writes:
>
>> Maybe it will, but it is a bad solution (busy wait).  It also does not
>> solve the error in process.c.  That error may very well be responsible
>> for the hang Emacs sometimes does when it should be saving the session
>> and exit.
>
> Hmm, I'm not sure I understand what you're saying.  My impression is
> that Emacs is getting stuck on wait_reading_process_output's select()
> call, which doesn't exit to do the necessary X event processing until
> some user input is available.  If that's the case, then the problem is
> calling select() with a long timeout.

I disagree.  The problem is not calling select with a ong timeout, the problem 
is not checking if there is queued events and handling them before entering 
select.

Checking Emacs as I run it, select is usually enetered with a timeout betweeen 
10 and 15 seconds, so the potential for this happening is great.

Any solution to a problem that increases frequency of polling is just 
fundamentally wrong.  It leads to increased CPU usage, and since code is 
executed often, it can not be swapped out. Also, debugging such code is hard 
because breakpoints can't be used reliably since the code depends on busy wait 
or polling.  Please do not commit that patch.

	Jan D.




This bug report was last modified 13 years and 91 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.