comp.lang.ada
 help / color / mirror / Atom feed
* Common sense...
@ 2002-07-05 17:19 chris.danx
  2002-07-05 17:28 ` Wes Groleau
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: chris.danx @ 2002-07-05 17:19 UTC (permalink / raw)


Hi,

What's the right thing to do in the following scenario concerning iterators
and lists?

A list is in use by three iterators, A, B and C.  A is at the position
preceding B and C, C calls the remove subroutine on that node and moves on.
The nodes iterator count which was 2 is decreased to 1.  B is the only
iterator using that node, but A wants to moves to the next position before B
exits the node (if B had exited the node prior to A calling next, there'd be
no problem).  Where does A go?  Does it go to the node at B or does it go to
the one after B?

I'd say A skips the node but I've got to go, Dinners out, and so can't
explain my thoughts on why until later!

Thanks,
Chris





^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2002-07-12 18:01 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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