From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: Reading D-Bus messages Date: Sun, 16 Aug 2009 14:30:54 +0200 Message-ID: <87eircq6td.fsf@gmx.de> References: <8763co99ax.fsf@gmx.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250425917 12090 80.91.229.12 (16 Aug 2009 12:31:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Aug 2009 12:31:57 +0000 (UTC) Cc: Mario Lang , "emacs-devel@gnu.org" To: YAMAMOTO Mitsuharu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 16 14:31:50 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mcetp-0003du-EU for ged-emacs-devel@m.gmane.org; Sun, 16 Aug 2009 14:31:49 +0200 Original-Received: from localhost ([127.0.0.1]:38213 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mceto-0003Pp-Il for ged-emacs-devel@m.gmane.org; Sun, 16 Aug 2009 08:31:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mcet6-0002sC-Cu for emacs-devel@gnu.org; Sun, 16 Aug 2009 08:31:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mcet1-0002qI-HU for emacs-devel@gnu.org; Sun, 16 Aug 2009 08:31:03 -0400 Original-Received: from [199.232.76.173] (port=36199 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mcet1-0002qB-BQ for emacs-devel@gnu.org; Sun, 16 Aug 2009 08:30:59 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:51868) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Mcet0-0001XN-Nc for emacs-devel@gnu.org; Sun, 16 Aug 2009 08:30:59 -0400 Original-Received: (qmail invoked by alias); 16 Aug 2009 12:30:57 -0000 Original-Received: from p57A220E7.dip0.t-ipconnect.de (EHLO arthur.local) [87.162.32.231] by mail.gmx.net (mp043) with SMTP; 16 Aug 2009 14:30:57 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1+3dkdHlBC3wtG/uzwVPAArW4R4jxKvowTJPju+Ju ZVXv0Z84z5V2PH In-Reply-To: (YAMAMOTO Mitsuharu's message of "Sun, 16 Aug 2009 09:09:08 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.67 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:114309 Archived-At: YAMAMOTO Mitsuharu writes: > While Emacs is idle, it blocks at the select() call in > wait_reading_process_output waiting for one of the several kinds of > events to happen: window-system events, subprocess output arrivals, > socket status changes, signal arrivals, and timer expirations. That's > why it is important to have a file/socket descriptor to monitor for > D-Bus in order to avoid consuming CPU time for polling. Finally, it was sufficient to add the D-Bus file descriptors via add_keyboard_wait_descriptor. Thanks for pushing me into the right direction! > As far as I browsed some D-Bus documents, > dbus_connection_set_watch_functions seems to have something to do with > this. DBusWatch uses its own select() loop. So it seems to be better to avoid it. Mario, could you, please, check whether it works for you? Best regards, Michael.