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-05 10:59:51 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.berkeley.edu!news-hog.berkeley.edu!ucberkeley!newshub.sdsu.edu!west.cox.net!cox.net!newspeer1-gui.server.ntli.net!ntli.net!newsfep1-win.server.ntli.net.POSTED!53ab2750!not-for-mail From: "chris.danx" Newsgroups: comp.lang.ada References: <3D25D743.9F10D353@despammed.com> Subject: Re: Common sense... X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Fri, 5 Jul 2002 18:58:22 +0100 NNTP-Posting-Host: 80.5.140.234 X-Complaints-To: abuse@ntlworld.com X-Trace: newsfep1-win.server.ntli.net 1025891932 80.5.140.234 (Fri, 05 Jul 2002 18:58:52 BST) NNTP-Posting-Date: Fri, 05 Jul 2002 18:58:52 BST Organization: ntl Cablemodem News Service Xref: archiver1.google.com comp.lang.ada:26882 Date: 2002-07-05T18:58:22+01:00 List-Id: "Wes Groleau" wrote in message news:3D25D743.9F10D353@despammed.com... > I'd say the iterators should be coded to prevent > more than one being on a particular node at any time. > > But then you'd have hassles with concurrency. There are hassles with concurrency in allowing more than one iterator to use the same node. What if the only iterator holding a node releases it at the same time as another aquires that node, and the node was marked for deletion? It could happen that the aquiring code is stopped a split second before completion, the node released, and the aquisition code resumed leading to a nutty situation. The point of these data structures isn't to be task safe, it's for non-concurrent use (Ada doesn't have tagged protected object yet, otherwise I'd code them to be task safe). Whenever concurrency is used, the programmer should probably run a protected object over the list and code their own iterators (which is feasible given the structure of the collection). > Maybe deletion should be delayed until such time > as no other iterator is at that node. Maybe.