Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Aug 2005 16:21:19 -0400
From:      John Baldwin <jhb@FreeBSD.org>
To:        Scott Long <scottl@samsco.org>
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: 6.0-BETA2: taskqueue_drain for if_xl.c:2796
Message-ID:  <200508171621.20259.jhb@FreeBSD.org>
In-Reply-To: <43039851.3020401@samsco.org>
References:  <20050811220017.A72944@hades.admin.frm2> <200508171509.48946.jhb@FreeBSD.org> <43039851.3020401@samsco.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508171621.20259.jhb>