After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 701511 - updates to various GSource types
updates to various GSource types
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-06-03 11:45 UTC by Dan Winship
Modified: 2013-07-13 20:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gsourceclosure: use g_cclosure_marshal_generic (4.63 KB, patch)
2013-06-03 11:45 UTC, Dan Winship
committed Details | Review
gsourceclosure: Add support for GUnixSignalWatchSource and GUnixFDSource (4.57 KB, patch)
2013-06-03 11:45 UTC, Dan Winship
committed Details | Review
gio: port unix streams to GUnixFDSource (6.57 KB, patch)
2013-06-03 11:45 UTC, Dan Winship
committed Details | Review
Remove some unnecessary source prepare/check functions (2.10 KB, patch)
2013-06-03 11:46 UTC, Dan Winship
committed Details | Review
gcancellable: update GCancellableSource, fix a race condition (3.65 KB, patch)
2013-06-03 11:46 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2013-06-03 11:45:08 UTC
see patches
Comment 1 Dan Winship 2013-06-03 11:45:12 UTC
Created attachment 245913 [details] [review]
gsourceclosure: use g_cclosure_marshal_generic

For the glib-defined source types, and any source type that defines a
closure callback but not a closure marshal, use
g_cclosure_marshal_generic. And then remove all the other remaining
source closure marshals.
Comment 2 Dan Winship 2013-06-03 11:45:39 UTC
Created attachment 245914 [details] [review]
gsourceclosure: Add support for GUnixSignalWatchSource and GUnixFDSource
Comment 3 Dan Winship 2013-06-03 11:45:58 UTC
Created attachment 245915 [details] [review]
gio: port unix streams to GUnixFDSource

The unix input/output streams were using a gio-only source type that
was mostly identical to GUnixFDSource. Get rid of that source type
and just use GUnixFDSource instead.
Comment 4 Dan Winship 2013-06-03 11:46:14 UTC
Created attachment 245916 [details] [review]
Remove some unnecessary source prepare/check functions

GPollableSource and GSocket's "broken" source never trigger on their
own, so with the changes to GSources in the last cycle, their check
and prepare functions are unnecessary (and undesired).
Comment 5 Dan Winship 2013-06-03 11:46:33 UTC
Created attachment 245917 [details] [review]
gcancellable: update GCancellableSource, fix a race condition

Update GCancellableSource to call g_source_set_ready_time() when its
cancellable is cancelled, rather than manually checking the state of
the cancellable from prepare() and check().

This means that we now need to use g_cancellable_connect() rather than
g_signal_connect() at construction time, to avoid the connect/cancel
race condition. Likewise, use g_cancellable_disconnect() to avoid the
disconnect/cancel race condition when freeing the source. (In fact,
that was necessary in the earlier code as well, and might have
occasionally caused spurious criticals or worse.)
Comment 6 Dan Winship 2013-07-13 20:40:28 UTC
Attachment 245913 [details] pushed as 1da47d5 - gsourceclosure: use g_cclosure_marshal_generic
Attachment 245914 [details] pushed as 8a89926 - gsourceclosure: Add support for GUnixSignalWatchSource and GUnixFDSource
Attachment 245915 [details] pushed as 6d328a0 - gio: port unix streams to GUnixFDSource
Attachment 245916 [details] pushed as 8f80fbb - Remove some unnecessary source prepare/check functions
Attachment 245917 [details] pushed as 8d0e0c6 - gcancellable: update GCancellableSource, fix a race condition