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-Thread: a07f3367d7,8e11100f675ea2df X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.66.72.131 with SMTP id d3mr12344251pav.38.1357902814845; Fri, 11 Jan 2013 03:13:34 -0800 (PST) Path: s9ni100577pbb.0!nntp.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border6.newsrouter.astraweb.com!news.astraweb.com!border6.a.newsrouter.astraweb.com!feed.xsnews.nl!border-1.ams.xsnews.nl!newsfeed.x-privat.org!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: asynchronous task communication Date: Tue, 8 Jan 2013 12:02:52 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <1c2dnd5E6PMDR33NnZ2dnUVZ_sednZ2d@earthlink.com> <50e18094$0$6583$9b4e6d93@newsspool3.arcor-online.net> <7NednS4s2oukfXzNnZ2dnUVZ_oadnZ2d@earthlink.com> <7cudnYloBfQDw3_NnZ2dnUVZ_rKdnZ2d@earthlink.com> <6bqdndEYjoxeGHnNnZ2dnUVZ_sadnZ2d@earthlink.com> Mime-Version: 1.0 Injection-Date: Tue, 8 Jan 2013 12:02:52 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="dfff62e1e537b55df42008571c03e0fe"; logging-data="31036"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1//3E5QEO0xjKETLQKxLRQco5Irh7Msr3A=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:dRZUBeece++ErI+LvQmvxQgguFQ= X-Received-Bytes: 2818 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 2013-01-08T12:02:52+00:00 List-Id: On Mon, 07 Jan 2013 11:27:20 -0700, Jeffrey Carter wrote: > On 01/07/2013 03:49 AM, Brian Drummond wrote: >> >> Then how do you maintain links from one such object to others, to build >> a network or graph? You can access a vector element via a cursor - is >> it safe and reasonable to store and use cursors to maintain references >> to an object as the vector grows? > > A "vector" is an unbounded array. You access an array component using an > index, > and that is also how to reference a component of an unbounded array. The > index of a specific component will not change unless the user > specifically changes it (by inserting a component with a smaller index, > for example). And the index is a Cursor type. So, holding onto a cursor would be unsafe (i.e. no longer refer to the original object) after an "insert" operation, possibly earlier in the vector? - Brian