From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#8869: Unjustified selection time-out Date: Mon, 20 Jun 2011 10:57:34 -0400 Message-ID: <878vswsg81.fsf@stupidchicken.com> References: <4DF955AF.6080107@harpegolden.net> <4DFA2303.2070304@harpegolden.net> <4DFB98D8.5030204@harpegolden.net> <871uyq23w3.fsf@stupidchicken.com> <4DFDCEF0.5060509@swipnet.se> <3E459F31-964C-4C5F-993F-2EFF2710893E@swipnet.se> <4DFEE846.8080601@swipnet.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1308581910 7384 80.91.229.12 (20 Jun 2011 14:58:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 20 Jun 2011 14:58:30 +0000 (UTC) Cc: "8869@debbugs.gnu.org" <8869@debbugs.gnu.org> To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jun 20 16:58:26 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QYfvl-0005I7-0j for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Jun 2011 16:58:25 +0200 Original-Received: from localhost ([::1]:45148 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYfvk-0003N4-5F for geb-bug-gnu-emacs@m.gmane.org; Mon, 20 Jun 2011 10:58:24 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:38202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYfvR-0003MZ-Uq for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2011 10:58:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QYfvQ-0008I9-8T for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2011 10:58:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45492) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYfvP-0008I5-WE for bug-gnu-emacs@gnu.org; Mon, 20 Jun 2011 10:58:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QYfvO-0002Rc-NQ; Mon, 20 Jun 2011 10:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jun 2011 14:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8869 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8869-submit@debbugs.gnu.org id=B8869.13085818639368 (code B ref 8869); Mon, 20 Jun 2011 14:58:02 +0000 Original-Received: (at 8869) by debbugs.gnu.org; 20 Jun 2011 14:57:43 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QYfv5-0002R3-Gr for submit@debbugs.gnu.org; Mon, 20 Jun 2011 10:57:43 -0400 Original-Received: from vm-emlprdomr-06.its.yale.edu ([130.132.50.147]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QYfv4-0002Qr-Js for 8869@debbugs.gnu.org; Mon, 20 Jun 2011 10:57:43 -0400 Original-Received: from furball (dhcp128036014060.central.yale.edu [128.36.14.60]) (authenticated bits=0) by vm-emlprdomr-06.its.yale.edu (8.14.4/8.14.4) with ESMTP id p5KEvait023883 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 20 Jun 2011 10:57:37 -0400 Original-Received: by furball (Postfix, from userid 1000) id 28FB31605DE; Mon, 20 Jun 2011 10:57:34 -0400 (EDT) In-Reply-To: <4DFEE846.8080601@swipnet.se> ("Jan =?UTF-8?Q?Dj=C3=A4rv?="'s message of "Mon, 20 Jun 2011 08:27:18 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.147 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 20 Jun 2011 10:58:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:47348 Archived-At: Jan Dj=C3=A4rv 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, 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. Other than reducing the select timeout, what solution is there?