comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <jrcarter@acm.org>
Subject: Re: Common sense...
Date: Sat, 06 Jul 2002 20:07:05 GMT
Date: 2002-07-06T20:07:05+00:00	[thread overview]
Message-ID: <3D274DE8.CFC52C47@acm.org> (raw)
In-Reply-To: YDzV8.16017$MM5.2240127@newsfep2-win.server.ntli.net

"chris.danx" wrote:
> 
> Additionally, each node in the list holds a count of the number of iterators
> and the number of objects which point to it (called positions as they
> represent a position in a list).  When both counts go to zero can a node be
> deallocated.  If a call to remove/delete is placed on a node, and the count
> of either is not zero, the node is marked and skipped by the appropriate
> subprograms (next, previous, has_next, has_previous, head, last).

Since iteration is atomic, I don't see how you can have more than one
iterator in action at once. In the presence of concurrency, you need to
have operations protected to ensure consistency; iteration would be one
of those operations.

Keeping a count of positions seems unnecessary. When a node is deleted,
any other positions pointing to it become invalid because you make the
node's ID invalid.

-- 
Jeff Carter
"I blow my nose on you."
Monty Python & the Holy Grail



  reply	other threads:[~2002-07-06 20:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-05 17:19 Common sense chris.danx
2002-07-05 17:28 ` Wes Groleau
2002-07-05 17:58   ` chris.danx
2002-07-05 21:34     ` Wes Groleau
2002-07-05 18:31 ` Jeffrey Carter
2002-07-05 18:54   ` chris.danx
2002-07-06  1:26     ` Jeffrey Carter
2002-07-06 10:28       ` chris.danx
2002-07-06 20:07         ` Jeffrey Carter [this message]
2002-07-06  6:52   ` Simon Wright
2002-07-05 20:16 ` chris.danx
2002-07-06  6:51 ` Simon Wright
2002-07-12 18:01   ` chris.danx
replies disabled

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