g_cancellable_source_new: don't use a file descriptor
commit09c18537f4e8b3ede066339cc23b76df8a4fc2cc
authorDan Winship <danw@gnome.org>
Tue, 17 Jul 2012 17:17:01 +0000 (17 13:17 -0400)
committerDan Winship <danw@gnome.org>
Tue, 17 Jul 2012 19:32:48 +0000 (17 15:32 -0400)
tree79c799d627285cc1077aa97d694075b92a3377d4
parent0e37822e10626859bcc6cb0452f1c0832e6990fa
g_cancellable_source_new: don't use a file descriptor

Rather than implementing GCancellableSource by polling on its fd,
implement it by just waking its GMainContext up from the "cancelled"
signal handler, thereby helping to reduce file descriptor usage.
Suggested by Ryan Lortie.

https://bugzilla.gnome.org/show_bug.cgi?id=680121
gio/gcancellable.c