~ted/glib/menu-model-docs

Viewing all changes in revision 13703.

  • Committer: Matthias Clasen
  • Author(s): Ryan Lortie
  • Date: 2013-07-28 21:19:38 UTC
  • Revision ID: git-v1:abbb22573813405215c11bff9fb6b110880fd711
inotify: don't assume mainloop is running

GFileMonitor takes great care to sample the thread-default main context
at the time that it is created in order that events can be dispatched to
the correct thread when they come in.

The inotify GFileMonitor implementation uses a global file descriptor
shared between all watches.  It has to poll this file descriptor from
somewhere so it arbitrarily picks the default main context.

The problem with that is that the user might not be running it.

Let's use the GLib worker thread for this instead.  It's guaranteed to
be running if you need it, and this is exactly the sort of problem it
was meant to solve.

https://bugzilla.gnome.org/show_bug.cgi?id=704873

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: