roxen.lists.pike.general

Subject Author Date
Re: Iterators and deleting entries from mappings Martin Bähr <mbaehr[at]email[dot]archlab[dot]tuwien[dot]ac> 15-01-2009
On Thu, Jan 15, 2009 at 12:45:05PM +0100, Martin Stjernholm wrote:
> Unfortunately it seems you're right. I'm sorry for the misinformation.
> The behavior I described only applies to multisets; I thought mappings
> were fixed to behave similarly.

what exactly is being fixed here?

> But in cases where an implicit deferred copy is unwanted overhead, it
> cannot be avoided with the current mapping behavior.

you mean, it can't be avoided because the mapping is set copy-on-write?
so the fix is to avoid copy-on-write (but introduce undetermined
behavior for new elements as a (maybe minor) downside. is that correct?

how does the copy-on-write work? wouldn't the m_delete like in stephens
example also trigger that?

greetings, martin.
-- 
cooperative communication with sTeam      -     caudium, pike, roxen and unix
offering: programming, training and administration   -  anywhere in the world
--
pike programmer   working in china                      community.gotpike.org
unix system-      iaeste.(tuwien.ac|or).at                     open-steam.org
administrator     caudium.org                                    is.schon.org
Martin Bähr       http://www.iaeste.or.at/~mbaehr/