[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] GObject bindings overview

On Fri, Jan 20, 2012 at 02:14:34PM +0000, Daniel P. Berrange wrote:
> > Cancellation:
> > *************
> > 
> > Certain apis are cancellable. These all take a GCancellable as the
> > final argument before GError **. This can be passed NULL if
> > cancellation is not required. While I have written cancellation, I
> > have not yet tested it *at all* other than it compiles and works
> > correctly when NULL is passed in.
> > 
> > We recently made Cancellable an explicit flag whereas before it was
> > implicit if the api had a FileIn or FileOut argument. This means it
> > is now possible to break the GObject api without breaking the C api
> > with the addition of a Cancellable flag. What potential solutions
> > are there to this problem? I can see:
> > 
> > • Live with breaking the GObject api if it ever comes up.
> > • Never add Cancellable to an existing api.
> > • Automatically add a GCancellable argument to all GObject apis,
> > just in case.
> I think option 2 is the only long term viable approach. If any existing
> APIs needs to be made cancellable, then define a new API that is the
> same, but with the cancellable flag set.

So the concern is that the GObject ABI changes?

>From my point of view I don't really care, since we only guarantee the
(real) C ABI.

But can we add GCancellable to everything?


Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]