From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 27 09:41:25 2013 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2894ED39; Wed, 27 Nov 2013 09:41:25 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 489BA23F2; Wed, 27 Nov 2013 09:41:23 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA00491; Wed, 27 Nov 2013 11:41:22 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1VlbcY-0005IV-2o; Wed, 27 Nov 2013 11:41:22 +0200 Message-ID: <5295BE1E.5090401@FreeBSD.org> Date: Wed, 27 Nov 2013 11:40:46 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: taskqueue_drain_all References: <525519F1.3050703@FreeBSD.org> <5295032B.4010200@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "freebsd-hackers@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 09:41:25 -0000 on 26/11/2013 23:44 Adrian Chadd said the following: > Hi, > > On 26 November 2013 12:23, Andriy Gapon wrote: >> on 09/10/2013 11:55 Andriy Gapon said the following: >>> >>> I would like to propose to extend taskqueue API with taskqueue_drain_all. >>> A potential use case: I have a private taskqueue, several kinds of tasks get >>> executed via it and then I want to make sure that all of them are completed. >>> Obviously, I have a way to ensure that no new ones get enqueued. >> >> Provided I do not get any no-s or why-s I am going to commit the following >> slightly different version soon: >> >> http://people.freebsd.org/~avg/taskqueue_drain_all.diff >> >> P.S. >> taskqueue_drain_running introduced in the above patch could also be used to add >> wait semantics to taskqueue_block. >> > > So you're going to keep taskqueue_drain() semantics of running the > tasks if they're queued? Yes, of course. Why? -- Andriy Gapon