comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon.j.wright@mac.com>
Subject: Re: Workqueues in Ada
Date: Sat, 28 Jul 2007 20:53:26 +0100
Date: 2007-07-28T20:53:26+01:00	[thread overview]
Message-ID: <m2zm1ggv9l.fsf@mac.com> (raw)
In-Reply-To: f8fvot$90e$1@atlantis.news.tpi.pl

Wiktor Moskwa <wiktorDOTmoskwa@gmail.com> writes:

> My idea of using a circular list is to call Delete and Append only
> when new node joins the system or an old one leaves. During normal
> operations a task will request new unit of work without deleting it
> from the queue.  It will be only marked as "currently in use". Other
> tasks will skip this node - Next_To_Service pointer will move
> clockwise skipping nodes that are serviced at the moment.

Sounds very complicated & fragile to me, it no longer resembles
anything one would recognise as a 'queue'.

Would it help to have a queue of pointer-to-work-item? (depends on how
big a work-item is, because (I have a strong impression that)
Ada.Containers containers allocate/deallocate on Append/Delete).

It's hard to see how to avoid this with unbounded containers. You
could look at alternative container packages? (I normally wouldn't
suggest this, given Ada.Containers, but a BC.Comtainers.Queues.Bounded
from http://booch95.sf.net doesn't allocate .. but you have to know
the maximum number of elements you are going to need.)



  reply	other threads:[~2007-07-28 19:53 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-28 17:00 Workqueues in Ada Wiktor Moskwa
2007-07-28 17:28 ` Dmitry A. Kazakov
2007-07-28 17:52   ` Wiktor Moskwa
2007-07-28 19:53     ` Simon Wright [this message]
2007-07-28 21:25       ` Wiktor Moskwa
2007-07-28 20:45     ` Dmitry A. Kazakov
2007-07-28 21:19       ` Wiktor Moskwa
2007-07-29  8:36         ` Dmitry A. Kazakov
2007-07-29 19:53           ` Wiktor Moskwa
2007-07-30  6:47             ` Niklas Holsti
2007-07-30 15:56               ` Matthew Heaney
2007-07-30 15:53             ` Matthew Heaney
2007-07-30 19:57               ` Wiktor Moskwa
2007-07-30 15:52           ` Matthew Heaney
2007-07-31 20:54             ` Wiktor Moskwa
2007-08-01  8:30               ` Dmitry A. Kazakov
2007-07-28 17:31 ` Jeffrey R. Carter
2007-07-28 17:56   ` Wiktor Moskwa
2007-07-28 20:18   ` Wiktor Moskwa
2007-07-28 20:48     ` Robert A Duff
2007-07-28 21:03       ` Wiktor Moskwa
2007-07-28 21:38         ` Robert A Duff
2007-07-28 22:12           ` Wiktor Moskwa
2007-07-29  0:30             ` Robert A Duff
2007-07-29  6:38               ` Jeffrey R. Carter
2007-07-29  6:34           ` Jeffrey R. Carter
2007-07-29  6:30     ` Jeffrey R. Carter
2007-07-28 21:54 ` Robert A Duff
2007-07-30 15:48 ` Matthew Heaney
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox