Re: hash table freeze is useless
- From: David Benson <daveb idealab com>
- To: gtk-devel-list redhat com
- Subject: Re: hash table freeze is useless
- Date: Fri, 5 Nov 1999 15:11:20 -0800 (PST)
I think it was kaz who pointed out that
it is safe to add and remove items
while iterating a frozen hashtable. (At least according
to my quick inspection.) Of course,
you'd better not delete the node you are visiting.
No strategy which supports resizing can easily support that
feature...
- Dave
On Fri, 5 Nov 1999, Havoc Pennington wrote:
>
> On Fri, 5 Nov 1999, David Benson wrote:
> >
> > I believe the intent is so you can freeze a hashtable that is
> > large, delete half the items, insert a bunch of new items
> > without resizing the table extraneously.
> >
>
> Ah yes, it works for that. I do think the function is intended (or at
> least documented) to work in the case where the table was not already
> large, however. And even in the above case it breaks if you insert more
> items than you delete.
>
> Havoc
>
>
> --
> To unsubscribe: mail gtk-devel-list-request@redhat.com with
> "unsubscribe" as the Subject.
>
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]