Skip to content
Commit 8d0e0c6f authored by Dan Winship's avatar Dan Winship
Browse files

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.)

https://bugzilla.gnome.org/show_bug.cgi?id=701511
parent 8f80fbb2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment