From owner-freebsd-current@FreeBSD.ORG Wed Aug 17 20:20:50 2005 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E109F16A41F for ; Wed, 17 Aug 2005 20:20:50 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6990143D45 for ; Wed, 17 Aug 2005 20:20:50 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[10.50.40.201]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Wed, 17 Aug 2005 16:35:43 -0400 From: John Baldwin To: Scott Long Date: Wed, 17 Aug 2005 16:21:19 -0400 User-Agent: KMail/1.8 References: <20050811220017.A72944@hades.admin.frm2> <200508171509.48946.jhb@FreeBSD.org> <43039851.3020401@samsco.org> In-Reply-To: <43039851.3020401@samsco.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508171621.20259.jhb@FreeBSD.org> Cc: freebsd-current@FreeBSD.org Subject: Re: 6.0-BETA2: taskqueue_drain for if_xl.c:2796 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Aug 2005 20:20:51 -0000 On Wednesday 17 August 2005 04:04 pm, Scott Long wrote: > >>I do think that taskqueue_stop() is a muddying of the API. If anyone > >>else has a comment on this (BDE?) I would be very interested to hear it. > > > > *shrug* It's already confusing in that callout_drain() does both a stop > > and then wait kind of like pthread_cancel() whereas taskqueue_drain() > > just waits until the task has run and finished without trying to cancel > > it like pthread_join(). I'd actually probably be inclined to rename > > callout_drain() to something else if we wanted to resolve that specific > > instance of confusion personally. > > True, consistency would be nice =-) Would you rather change > taskqueue_drain() to be more like callout_drain()? I don't think so. It can be useful to fire off an async event and then wait for it to complete when you still definitely want it to run. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org