On Fri, Apr 17, 2015 at 07:06:04PM +0200, Paolo Bonzini wrote:
>
>
> On 17/04/2015 18:11, Daniel P. Berrange wrote:
> >
> > +task = qio_task_new(OBJECT(ioc),
> > +func, opaque, destroy);
> > +
> > +qio_channel_tls_handshake_task(ioc, task);
> > +
> > +object_u
On 17/04/2015 18:11, Daniel P. Berrange wrote:
>
> +task = qio_task_new(OBJECT(ioc),
> +func, opaque, destroy);
> +
> +qio_channel_tls_handshake_task(ioc, task);
> +
> +object_unref(OBJECT(task));
>
> The second ref taken at time of qio_channel_add_watch_full
On Fri, Apr 17, 2015 at 05:57:24PM +0200, Paolo Bonzini wrote:
>
>
> On 17/04/2015 17:49, Daniel P. Berrange wrote:
> > > In this case I even think you're leaking the task. You do object_ref
> > > twice (once at creation time, once before qio_channel_add_watch_full)
> > > and only have one objec
On Fri, Apr 17, 2015 at 05:16:26PM +0200, Paolo Bonzini wrote:
>
>
> On 17/04/2015 16:22, Daniel P. Berrange wrote:
> > A number of I/O operations need to be performed asynchronously
> > to avoid blocking the main loop. The caller of such APIs need
> > to provide a callback to be invoked on compl
On 17/04/2015 17:49, Daniel P. Berrange wrote:
> > In this case I even think you're leaking the task. You do object_ref
> > twice (once at creation time, once before qio_channel_add_watch_full)
> > and only have one object_unref. I would just do without reference
> > counting, and add a qio_tas
On 17/04/2015 16:22, Daniel P. Berrange wrote:
> A number of I/O operations need to be performed asynchronously
> to avoid blocking the main loop. The caller of such APIs need
> to provide a callback to be invoked on completion/error and
> need access to the error, if any. The small QIOTask provi
A number of I/O operations need to be performed asynchronously
to avoid blocking the main loop. The caller of such APIs need
to provide a callback to be invoked on completion/error and
need access to the error, if any. The small QIOTask provides
a simple framework for dealing with such probes. The