Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[Freeciv-Dev] Re: list cleaning
Home

[Freeciv-Dev] Re: list cleaning

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: list cleaning
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Sat, 29 Nov 2003 15:07:19 +0000 (GMT)

On Sat, 29 Nov 2003, Raimar Falke wrote:
> There is another way. If this 'normalize' iterators are in place we
> can ensure with assert that unlink isn't called when we are currently
> iterating over the list. Such cases would then be replaced (by hand)
> with safe iterations. This is the conservative approach: you can be
> sure that there are no unsafe unlinks and there is a known and
> constant memory and cpu-time usage.

Not if deletions only happen in extremely rare cases. This does happen.
Then you just introduced a new bug where there may not have been one
previously.

  - Per



[Prev in Thread] Current Thread [Next in Thread]