From: Bruno Haible <bruno@clisp.org>
To: "Marc Nieper-Wißkirchen" <marc.nieper+gnu@gmail.com>
Cc: bug-gnulib@gnu.org
Subject: Re: HAMT iterator
Date: Sun, 11 Oct 2020 14:04:17 +0200 [thread overview]
Message-ID: <1623163.624ODokV5P@omega> (raw)
In-Reply-To: <CAEYrNrTBRG52_h1-p2M4cMEixfeSbgmAHUaKtP1c0RU4VEoUBQ@mail.gmail.com>
Marc Nieper-Wißkirchen wrote:
> > > /* Return an independent copy of ITER that is initially in the same
> > > state. */
> > > extern Hamt_iterator *hamt_iterator_copy (Hamt_iterator *iter);
> >
> > Then a copy function is not needed, because the user's program can do
> >
> > Hamt_iterator iter_clone = iter;
>
> The hamt itself has to be copied (to increase the reference counter).
Then the comment should clarify what "independent" means. I thought it
means that both iterators (the original one and the copy) can be used
simultaneously, as long as the HAMT does not change. Do you mean
something broader?
- If someone creates a derivative of the HAMT, the iterator won't
be affected, right? ("persistence")
- If someone makes destructive modifications to the HAMT (through the
*_x functions), the iterator will be affected if it has not yet
passed the point of modification, right?
So, what is the scenario where increasing the reference count will make
a difference?
Bruno
next prev parent reply other threads:[~2020-10-11 12:04 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-09 21:07 [New module] Persistent Hash Array Mapped Tries (HAMTs) Marc Nieper-Wißkirchen
2020-10-10 14:35 ` Bruno Haible
2020-10-10 14:46 ` Marc Nieper-Wißkirchen
2020-10-10 17:34 ` Bruno Haible
2020-10-10 14:54 ` Bruno Haible
2020-10-10 15:01 ` Marc Nieper-Wißkirchen
2020-10-10 15:04 ` Marc Nieper-Wißkirchen
2020-10-10 17:41 ` Bruno Haible
2020-10-10 17:49 ` Marc Nieper-Wißkirchen
2020-10-10 18:19 ` Paul Eggert
2020-10-10 21:24 ` Marc Nieper-Wißkirchen
2020-10-10 21:46 ` Marc Nieper-Wißkirchen
2020-10-11 1:28 ` Bruno Haible
2020-10-11 8:20 ` Marc Nieper-Wißkirchen
2020-10-11 9:43 ` Marc Nieper-Wißkirchen
2020-10-11 11:02 ` HAMT iterator Bruno Haible
2020-10-11 11:08 ` Marc Nieper-Wißkirchen
2020-10-11 12:04 ` Bruno Haible [this message]
2020-10-11 12:25 ` Marc Nieper-Wißkirchen
2020-10-11 13:52 ` Bruno Haible
2020-10-11 12:14 ` Bruno Haible
2020-10-11 12:22 ` Marc Nieper-Wißkirchen
2020-10-11 10:29 ` HAMT iterators Bruno Haible
2020-10-11 12:44 ` Marc Nieper-Wißkirchen
2020-10-11 13:47 ` Bruno Haible
2020-10-11 10:53 ` out-of-memory handling Bruno Haible
2020-10-11 11:07 ` Marc Nieper-Wißkirchen
2020-10-11 11:56 ` Bruno Haible
2020-10-11 12:20 ` Marc Nieper-Wißkirchen
2020-10-11 14:01 ` HAMT for gl_set and gl_map Bruno Haible
2020-10-11 17:32 ` [New module] Persistent Hash Array Mapped Tries (HAMTs) Marc Nieper-Wißkirchen
2020-10-11 18:22 ` Draft #3 (with iterators) Marc Nieper-Wißkirchen
2020-10-11 19:09 ` Bruno Haible
2020-10-12 6:06 ` Non-opaque hamt type? Marc Nieper-Wißkirchen
2020-10-18 14:39 ` Bruno Haible
2020-10-18 15:29 ` Marc Nieper-Wißkirchen
2020-10-18 17:58 ` Bruno Haible
2020-10-18 18:11 ` Marc Nieper-Wißkirchen
2021-04-03 9:08 ` Marc Nieper-Wißkirchen
2021-04-03 10:26 ` Bruno Haible
2020-10-11 14:14 ` terminology Bruno Haible
2020-10-11 14:20 ` terminology Marc Nieper-Wißkirchen
2020-10-10 22:39 ` _Atomic Bruno Haible
2020-10-11 20:15 ` _Atomic Paul Eggert
2020-10-11 21:47 ` _Atomic Bruno Haible
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1623163.624ODokV5P@omega \
--to=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
--cc=marc.nieper+gnu@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).