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


View this message in rfc822 format

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: bug#8869: Unjustified selection time-out
Date: Mon, 20 Jun 2011 17:24:33 +0200

Chong Yidong skrev 2011-06-20 16.57:
> Jan Djärv<jan.h.d <at> swipnet.se>  writes:
>
>> 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.
>
> But the selection request from the other X client can arrive at any
> time,

No, it can't.  It must arrive after SAVE_TARGET and it is not read unless any 
X code (XNextEvent or gtk_events_pending()) is executed.

> not necessarily before we enter the select.

> If the front part of
> wait_reading_process_output executes very quickly, we'll enter the
> select before a response is ready, in which case Emacs will wait the
> entire 20 seconds if no other input is available.

No, in that case the X request has not been read and it still in the socket.
Select will then detect that and return.  It is not before XTread_socket is 
called the event is actually read.

	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.