From: "chris.danx" <spamoff.danx@ntlworld.com>
Subject: Re: Common sense...
Date: Fri, 5 Jul 2002 18:58:22 +0100
Date: 2002-07-05T18:58:22+01:00 [thread overview]
Message-ID: <w7lV8.2183$7i3.136606@newsfep1-win.server.ntli.net> (raw)
In-Reply-To: 3D25D743.9F10D353@despammed.com
"Wes Groleau" <wesgroleau@despammed.com> wrote in message
news:3D25D743.9F10D353@despammed.com...
> I'd say the iterators should be coded to prevent
> more than one being on a particular node at any time.
>
> But then you'd have hassles with concurrency.
There are hassles with concurrency in allowing more than one iterator to use
the same node. What if the only iterator holding a node releases it at the
same time as another aquires that node, and the node was marked for
deletion? It could happen that the aquiring code is stopped a split second
before completion, the node released, and the aquisition code resumed
leading to a nutty situation.
The point of these data structures isn't to be task safe, it's for
non-concurrent use (Ada doesn't have tagged protected object yet, otherwise
I'd code them to be task safe). Whenever concurrency is used, the
programmer should probably run a protected object over the list and code
their own iterators (which is feasible given the structure of the
collection).
> Maybe deletion should be delayed until such time
> as no other iterator is at that node.
Maybe.
next prev parent reply other threads:[~2002-07-05 17:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-05 17:19 Common sense chris.danx
2002-07-05 17:28 ` Wes Groleau
2002-07-05 17:58 ` chris.danx [this message]
2002-07-05 21:34 ` Wes Groleau
2002-07-05 18:31 ` Jeffrey Carter
2002-07-05 18:54 ` chris.danx
2002-07-06 1:26 ` Jeffrey Carter
2002-07-06 10:28 ` chris.danx
2002-07-06 20:07 ` Jeffrey Carter
2002-07-06 6:52 ` Simon Wright
2002-07-05 20:16 ` chris.danx
2002-07-06 6:51 ` Simon Wright
2002-07-12 18:01 ` chris.danx
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox