unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dima Kogan <lists@dima.secretsauce.net>
To: "Perry E. Metzger" <perry@piermont.com>
Cc: Michael Albinus <michael.albinus@gmx.de>,
	Stefan Monnier <monnier@IRO.UMontreal.CA>,
	emacs-devel@gnu.org
Subject: Re: gfile-based file notifications are not immediate
Date: Thu, 30 Oct 2014 12:39:55 -0700	[thread overview]
Message-ID: <87ioj1l4su.fsf@secretsauce.net> (raw)
In-Reply-To: <20141030152111.166096c7@jabberwock.cb.piermont.com>

Perry E. Metzger <perry@piermont.com> writes:

> On Thu, 30 Oct 2014 19:11:55 +0100 Michael Albinus
> <michael.albinus@gmx.de> wrote:
>> Stefan Monnier <monnier@IRO.UMontreal.CA> 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.



  reply	other threads:[~2014-10-30 19:39 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-25 20:17 gfile-based file notifications are not immediate Dima Kogan
2014-10-26  7:55 ` Michael Albinus
2014-10-26 13:12   ` Ken Brown
2014-10-28 21:33   ` Rüdiger Sonderfeld
2014-10-29  1:06     ` Stefan Monnier
2014-10-29  2:23       ` Dima Kogan
2014-10-29  3:54         ` Stefan Monnier
2014-10-29 12:03           ` Michael Albinus
2014-10-29 13:56             ` Stefan Monnier
2014-10-29 14:11               ` Óscar Fuentes
2014-10-29 15:29                 ` Stefan Monnier
2014-10-29 16:28               ` Michael Albinus
2014-10-29 20:34                 ` Stefan Monnier
2014-10-30 15:16               ` Perry E. Metzger
2014-10-30 16:51                 ` Stefan Monnier
2014-10-30 17:10                   ` Perry E. Metzger
2014-10-30 17:40                     ` Michael Albinus
2014-10-30 18:04                       ` Perry E. Metzger
2014-10-30 18:06                       ` Stefan Monnier
2014-10-30 18:11                         ` Michael Albinus
2014-10-30 19:21                           ` Perry E. Metzger
2014-10-30 19:39                             ` Dima Kogan [this message]
2014-10-30 19:27                           ` Stefan Monnier
2014-10-29 14:00             ` Wolfgang Jenkner
2014-10-30 19:12               ` Wolfgang Jenkner
2014-10-30 20:32               ` Rüdiger Sonderfeld
2014-10-31 21:28                 ` Perry E. Metzger
2014-11-02 14:15                   ` Noam Postavsky
2014-11-02 15:50                     ` Perry E. Metzger
2014-10-26 16:02 ` Eli Zaretskii
2014-10-26 17:07   ` Dima Kogan
2014-10-26 17:14     ` Eli Zaretskii
2014-10-26 16:41 ` Michael Albinus
2014-10-28  0:32   ` Dima Kogan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ioj1l4su.fsf@secretsauce.net \
    --to=lists@dima.secretsauce.net \
    --cc=emacs-devel@gnu.org \
    --cc=michael.albinus@gmx.de \
    --cc=monnier@IRO.UMontreal.CA \
    --cc=perry@piermont.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).