lkml.org 
[lkml]   [2004]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] add unschedule_delayed_work to the workqueue API
From
Date
On Mon, 2004-10-18 at 16:25, Andrew Morton wrote:
> James Bottomley <James.Bottomley@SteelEye.com> wrote:
> >
> > I'm in the process of moving some of our scsi timers which do more work
> > than just a few lines of code into schedule_work() instead. The problem
> > is that the workqueue API lacks the equivalent of del_timer_sync().
>
> The usual way of doing this is:
>
> cancel_delayed_work(...);

That API doesn't seem to be in the vanilla kernel ... is it mm only?

> flush_workqueue(...);

Yes, but the flush_workqueue() has you waiting until every piece of work
on the workqueue has completed ... that creates an unacceptable delay in
the routine that wants it either cancelled or run.

James



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.056 / U:1.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site