From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dima Kogan Newsgroups: gmane.emacs.devel Subject: Re: gfile-based file notifications are not immediate Date: Thu, 30 Oct 2014 12:39:55 -0700 Message-ID: <87ioj1l4su.fsf@secretsauce.net> References: <87mw8jg9a1.fsf@secretsauce.net> <87y4s31czw.fsf@gmx.de> <6770871.AMhgTgWFL5@descartes> <87ppdbehjw.fsf@secretsauce.net> <87ioj3m6ah.fsf@gmx.de> <20141030111656.5c6f3b6b@jabberwock.cb.piermont.com> <20141030131018.00832b04@jabberwock.cb.piermont.com> <87fve54fsi.fsf@gmx.de> <87a94d4ec4.fsf@gmx.de> <20141030152111.166096c7@jabberwock.cb.piermont.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1414771341 10955 80.91.229.3 (31 Oct 2014 16:02:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Oct 2014 16:02:21 +0000 (UTC) Cc: Michael Albinus , Stefan Monnier , emacs-devel@gnu.org To: "Perry E. Metzger" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 31 17:02:15 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XkEeV-0001T3-D1 for ged-emacs-devel@m.gmane.org; Fri, 31 Oct 2014 17:02:15 +0100 Original-Received: from localhost ([::1]:38584 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkEeU-0003tU-Uw for ged-emacs-devel@m.gmane.org; Fri, 31 Oct 2014 12:02:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkE8W-0005kK-DF for emacs-devel@gnu.org; Fri, 31 Oct 2014 11:30:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjvfU-00064N-Fe for emacs-devel@gnu.org; Thu, 30 Oct 2014 15:46:04 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:51066) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjvfU-00062n-8D for emacs-devel@gnu.org; Thu, 30 Oct 2014 15:46:00 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id BA8F020C30 for ; Thu, 30 Oct 2014 15:45:55 -0400 (EDT) Original-Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 30 Oct 2014 15:45:55 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:references:from:to:cc:subject :date:in-reply-to:message-id:mime-version:content-type; s= smtpout; bh=DfzERApG1dlcaOQibDX4StUsgIA=; b=VQgrp3NMIGJPEa0zmg3o ING3Q7zDmwzjOuO5FFD2tm7Ux4O0d0qrvrDIDQ3S6dUXepBMZZ7S3Z+zThxSM2kd I1LRNjivd5mbxO6dw52r2bcSF5WWPzZQH92T/jgvS1Wh5XEUgYh+RS1j8i+kC3pt DRP52X+OIVxa+6a3i/3SrDw= X-Sasl-enc: deHfoE80qoc95Rp7jlfpAH3DXmQnAFMtIkApFLWAlrjn 1414698355 Original-Received: from shorty.local (unknown [76.91.145.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 7282B680146; Thu, 30 Oct 2014 15:45:55 -0400 (EDT) Original-Received: from dima by shorty.local with local (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1XjvfO-0005uG-0y; Thu, 30 Oct 2014 12:45:54 -0700 In-reply-to: <20141030152111.166096c7@jabberwock.cb.piermont.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.111.4.27 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:176072 Archived-At: Perry E. Metzger writes: > On Thu, 30 Oct 2014 19:11:55 +0100 Michael Albinus > wrote: >> Stefan Monnier writes: >> >> >> If people on BSD/OS X do not want to use glib, somebody shall >> >> write kqueue support. But it is said to be a hassle, >> > >> > .. and a waste of time since glib already does it for us, >> >> I agree with you. But *if* somebody writes native kqueue support, >> because he doesn't want to touch glib on OS X: would you as Emacs >> maintainer reject this contribution? > > I've been reading the actual code. So far, I'm not sure > how glib could be conveniently used here on Mac OS X even if one > wanted to. From what I can tell, the glib code seems to depend on the > central event loop being managed by glib/gtk, which is not the case > on a port that uses a different GUI. There are also different select > replacements (ns_select vs xg_select etc) used on the different > platforms because they have differing event loop handling. > > I might be mistaken, though. I've never read any of the low level > event handling code before and I'm still a bit fuzzy on all the > details. Look at xg_select.c. You call g_main_context_query() to retrieve a list of file descriptors, and then you use pselect() on those AND on other file descriptors emacs cares about. So even on my Debian machine the event loop is still handled by emacs. And please note that the whole reason I started this whole kerfuffle was to get rid of delays in auto-revert-mode, and inotify is way closer to getting us there than glib is: https://bugzilla.gnome.org/show_bug.cgi?id=739322 So please do not get rid of the inotify stuff yet.