On Mon, Jul 23, 2001 at 08:42:21PM -0400, Glenn F. Maynard wrote:
> I've been experimenting with the idea I presented of an explicit queue feeder.
> It looks like it'd work rather well.

Good idea.

> A less obvious, but possibly just as significant benefit: it pulls a few queue
> variables out of CmdExec.  The pwd and lpwd caches move to QueueFeeder.
> is_queue goes away since we can just search for the feeder type.

No, better leave is_queue in place.

> Are you deliberately avoiding rtti, or has it not been used due to lack of
> application?  I'm using it to search for QueueFeeders.  It'd mean an extra
> override for feeders to avoid this, and that's what RTTI is for ...

rtti looks like voodoo to me. It is rarely needed but enlarges all
objects. It can be easily avoided.

Searching for QueueFeeder is easy without rtti. Just check for is_queue and
the first feeder (last in chain) will be QueueFeeder if is_queue==true.

> This is a more significant change than the others, so it's a judgement call
> if you want to take the patch or not.  It turned out to be much easier than
> I thought it'd be.  I've attached the patch as-is for feedback.  It's not
> done--it breaks "jobs" (since it feeds commands one at a time), lacks actual
> queue editing (and, incidentally, queue --edit, for the same reason as jobs)
> and isn't tested well enough.

Don't forget to quote cwd and lcwd properly. Use CmdExec::unquote (maybe
unfortunate name).

> Fixing jobs will probably involve letting feeders have a pass at jobs outputs;
> this will allow showing feeder-specific data (ie pwd/lpwd), and could
> potentially allow optimizing FileFeeder, too (if it's a seekable stream, and
> the user asks for the *whole* queue, that can be done straight from disk.) I'd
> probably replace queue editing with a small set of editing commands (delete,
> move, change pwd/lpwd, a queue flag to insert a command at a given position.)
> It's possible to keep direct queue editing for this, but it'd probably not be
> worth the work.

You are right that feeder can be called to show its status in jobs. is_queue
can also be helpful for CmdExec to alter its status accordingly.

--
   Alexander.                      | http://www.yars.free.net/~lav/

Reply via email to