[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8869: Unjustified selection time-out

From: Jan Djärv
Subject: bug#8869: Unjustified selection time-out
Date: Mon, 20 Jun 2011 08:27:18 +0200
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv: Gecko/20110613 Thunderbird/3.1.11

Chong Yidong skrev 2011-06-19 23.13:
Jan Djärv<address@hidden>  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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]