On Thu, Jan 05, 2017 at 03:47:57PM -0600, Eric Blake wrote: > On 01/05/2017 10:03 AM, Daniel P. Berrange wrote: > > Currently the QIOTaskFunc signature takes an Object * for > > the source, and an Error * for any error. We also need to > > be able to provide a result pointer. Rather than continue > > to add parameters to QIOTaskFunc, remove the existing > > ones and simply pass the QIOTask object instead. This > > has methods to access all the other data items required > > in the callback impl. > > Hmmm. If you're going to change the callback signature after all, then > is it worth considering having the callback return void* instead of the > clunky way of passing the result pointer around, with existing callers > updated to return NULL if they have nothing better to do? Accessing the > error pointer through the QIOTask object seems okay, it's just the > return type that feels clunky. > > But that's bike-shedding, so I'll review as written.
Per my comments in previous patch, the approach taken here was chosen to align with GLib's GTask/GAsyncResult design more closely. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|