[Bug 13422] Add nice API for channel creation
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Aug 4 12:23:21 CEST 2010
https://bugs.freedesktop.org/show_bug.cgi?id=13422
--- Comment #19 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-08-04 03:23:20 PDT ---
> {
> ctx->cancel_id = g_cancellable_connect (ctx->cancellable,
> G_CALLBACK (operation_cancelled_cb), ctx, NULL);
> +
> + /* We just aborted the operation so we're done */
> + if (g_cancellable_is_cancelled (ctx->cancellable))
> + return;
> }
Be careful with this sort of thing - part of the point of GCancellable is that
it can be cancelled at any time, even from another thread.
I think you're actually correct here, as it happens - if the cancellable is
cancelled after g_cancellable_connect releases the lock but before
g_cancellable_is_cancelled checks it, then operation_cancelled_cb has been
scheduled to run in an idle in our thread, there's no point in calling Proceed,
and operation_cancelled_cb will run shortly after this early-return.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the telepathy-bugs
mailing list