Re: 6.0-BETA2: taskqueue_drain for if_xl.c:2796

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 17 Aug 2005 16:21:19 -0400
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_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org
Received on Wed Aug 17 2005 - 18:20:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:41 UTC