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=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,93ab7fc5388e249 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-07 08:00:46 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.visi.com!hermes.visi.com!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <3C0E1FA1.45A38A75@brighton.ac.uk> <%7sP7.49836$xS6.82296@www.newsranger.com> <3C0FAF0C.A46BB265@san.rr.com> Subject: Re: List container strawman 1.3 Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Fri, 07 Dec 2001 11:00:29 EST Organization: http://www.newsranger.com Date: Fri, 07 Dec 2001 16:00:29 GMT Xref: archiver1.google.com comp.lang.ada:17571 Date: 2001-12-07T16:00:29+00:00 List-Id: In article <3C0FAF0C.A46BB265@san.rr.com>, Darren New says... > >For efficiency, keep track in each iterator and each list head the >number of deletes (or other operations that might invalidate an >iterator) that have occurred. If an iterator is accessed when that >counter in the iterator is smaller than the counter in the list it's >iterating, run through the list (O(N)) and check if the iterator is >pointing to one of the still-existant nodes. Suppose a new node got added right after the deletion? In that case its quite possible that your iterator is now unintentionally pointing to the new node instead of the old deleted one. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced.