From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55293 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OOuvA-0003LB-4h for qemu-devel@nongnu.org; Wed, 16 Jun 2010 11:52:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OOuv7-0005kb-C0 for qemu-devel@nongnu.org; Wed, 16 Jun 2010 11:52:56 -0400 Received: from e2.ny.us.ibm.com ([32.97.182.142]:39508) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OOuv7-0005kA-8W for qemu-devel@nongnu.org; Wed, 16 Jun 2010 11:52:53 -0400 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by e2.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id o5GFe9o6026128 for ; Wed, 16 Jun 2010 11:40:09 -0400 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o5GFqod2138836 for ; Wed, 16 Jun 2010 11:52:50 -0400 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o5GFqgSC028511 for ; Wed, 16 Jun 2010 09:52:43 -0600 Message-ID: <4C18F348.9000909@linux.vnet.ibm.com> Date: Wed, 16 Jun 2010 10:52:40 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH V4 2/3] qemu: Generic task offloading framework: threadlets References: <20100616115404.10988.62371.stgit@localhost.localdomain> <20100616115656.10988.96529.stgit@localhost.localdomain> <4C18C4C8.8090901@redhat.com> <20100616142236.GA20052@shareable.org> <4C18DFD7.1090102@redhat.com> <4C18E1E8.3030606@linux.vnet.ibm.com> <4C18E52B.9010600@redhat.com> <4C18EBC4.4040603@linux.vnet.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Corentin Chary Cc: Gautham R Shenoy , Qemu-development List , Avi Kivity , Paolo Bonzini , "Aneesh Kumar K.V" On 06/16/2010 10:47 AM, Corentin Chary wrote: > > I would need something like flush_threadlet_queue for the vnc server. > I need it in > vnc_disconnect(), vnc_dpy_resize() and vnc_dpy_cpy() so wait (and/or > abort) current > encoding jobs. > I'm not sure threadlets are the right thing for the VNC server. The VNC server wants one dedicated thread. Threadlets are a thread pool. You could potentially use one thread per client but I doubt it would be worth it. At any rate, flushing the full queue is overkill. You want to wait for your specific thread to terminate and you want to block execution until that happens. IOW, you want to join the thread. Regards, Anthony Liguori