On Wed, Feb 28, 2018 at 01:07:44PM +0000, Daniel P. Berrangé wrote:
> On Wed, Feb 28, 2018 at 08:54:00PM +0800, Peter Xu wrote:
> > On Wed, Feb 28, 2018 at 09:16:59AM +0000, Daniel P. Berrangé wrote:
> > > On Wed, Feb 28, 2018 at 01:06:29PM +0800, Peter Xu wrote:
> > > > It will be used in multiple threads in follow-up patches.  Let it start
> > > > to have refcounts.
> > > > 
> > > > Signed-off-by: Peter Xu <[email protected]>
> > > > ---
> > > >  include/io/task.h |  3 +++
> > > >  io/task.c         | 23 ++++++++++++++++++++++-
> > > >  2 files changed, 25 insertions(+), 1 deletion(-)
> > > > 
> > > > diff --git a/include/io/task.h b/include/io/task.h
> > > > index 9dbe3758d7..c6acd6489c 100644
> > > > --- a/include/io/task.h
> > > > +++ b/include/io/task.h
> > > > @@ -322,4 +322,7 @@ gpointer qio_task_get_result_pointer(QIOTask *task);
> > > >   */
> > > >  Object *qio_task_get_source(QIOTask *task);
> > > >  
> > > > +void qio_task_ref(QIOTask *task);
> > > > +void qio_task_unref(QIOTask *task);
> > > 
> > > It should just be turned back into a QObject as it was originally,
> > > so we get refcounting for free.
> > 
> > Could you point me the commit that has the original code?  I would be
> > glad to revert to that, or yeah I can switch to QObject too.  Thanks,
> 
> It was never actually committed - it was just that way during initial
> review but was suggested to be simplified as ref counting wasn't needed.
> 
> That all said, having now seen the later parts of this patch series, I
> don't think we would need todo this at all, because we should not be
> exposing the GTask to callers and thus the refcounting question goes away

Indeed.  I suppose that means you like my proposal in the other
thread.  But I'll wait for your explicit acknowledgement in that too.

Thanks,

-- 
Peter Xu

Reply via email to