GNOME Bugzilla – Bug 701511
updates to various GSource types
Last modified: 2013-07-13 20:40:40 UTC
see patches
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.
Created attachment 245914 [details] [review] gsourceclosure: Add support for GUnixSignalWatchSource and GUnixFDSource
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.
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).
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.)
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