From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4d2a71c8801ecab1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-06 13:07:20 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.wirehub.nl!newsfeed.news2me.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!59ce1190!not-for-mail Message-ID: <3D274DE8.CFC52C47@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Common sense... References: <3D25E607.E59E11E2@acm.org> <3D26473B.581C61BC@acm.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sat, 06 Jul 2002 20:07:05 GMT NNTP-Posting-Host: 63.184.9.24 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1025986025 63.184.9.24 (Sat, 06 Jul 2002 13:07:05 PDT) NNTP-Posting-Date: Sat, 06 Jul 2002 13:07:05 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:26905 Date: 2002-07-06T20:07:05+00:00 List-Id: "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