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
Please register or sign in to comment