qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 11/14] qio/chardev: return QIOTask when connect


From: Peter Xu
Subject: Re: [Qemu-devel] [PATCH 11/14] qio/chardev: return QIOTask when connect async
Date: Wed, 28 Feb 2018 21:07:56 +0800
User-agent: Mutt/1.9.1 (2017-09-22)

On Wed, Feb 28, 2018 at 09:20:47AM +0000, Daniel P. Berrangé wrote:
> On Wed, Feb 28, 2018 at 01:06:30PM +0800, Peter Xu wrote:
> > Let qio_channel_socket_connect_async() return the created QIOTask object
> > for the async connection.  In tcp chardev, cache that in SocketChardev
> > for further use.  With the QIOTask refcount, this is pretty safe.
> 
> Why do you want to return QIOTask ? This is going against the intended
> design pattern for QIOTask (that was based on that in GLib). The task
> supposed to be an internal use only helper that callers should never
> be touching until the completion callback is invoked.

I proposed another solution in the other comment reply to split the
threaded QIO task into create() and run().  If you like that, I can
try.  Any other suggestion would be welcomed too.  Thanks,

-- 
Peter Xu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]