Re: API update proposal: cancellation notification
- From: "Juan A." Suárez Romero <jasuarez igalia com>
- To: grilo-list gnome org
- Subject: Re: API update proposal: cancellation notification
- Date: Mon, 24 Jan 2011 17:16:57 +0100
On Mon, 2011-01-24 at 16:02 +0000, Iago Toral wrote:
> Mmm, good point. That's something I think we should really avoid,
> because if we do that then operations would have 2 finishing points:
> callback (when they are not cancelled) and the signal (when they
> And that's not a good idea IMHO. The whole point of always invoking
> callback was to ease the operation finalization process after all. I
> guess we could have grilo connect to the signal and invoke the
> instead, but sounds kind of tricky and is not what GCancellable
> would expect...
Note that this is how GIO works. When an operation is cancelled, your
"callback" is invoked. And there you can check if the operation was
cancelled or not.
But also provides the signal, which you can connect or not.
Reviewing the API, seems there is a function to set up if cancellation
is notified to callback through a GError
In doc, there's an example where this GError notification is disabled
before connecting to cancelled signal.
] [Thread Prev