Subject: Re: [boost] [yield_iterator] new iterator lib with C# yield return/yield break
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2011-06-21 01:23:27
If the threads don't modify the tree you could use the yield-iterator - otherwise you would have to protected the tree against modifications anyway.
The yield-iterator can be used if the tree is shared between several threads. If you don't use thread-specific storage you could move the iterator from on thread to another (but you can't use it in multiple threads at the same time -> critical section).
-------- Original-Nachricht --------
> Datum: Tue, 21 Jun 2011 10:12:48 +0800
> Von: Sylvain Bougerel <sylvain.bougerel.devel_at_[hidden]>
> An: boost_at_[hidden]
> Betreff: Re: [boost] [yield_iterator] new iterator lib with C# yield return/yield break
> On Jun 21, 2011 2:15 AM, "Oliver Kowalke" <oliver.kowalke_at_[hidden]> wrote:
> > For instance iterating an tree would usally require to traverse the
> complete tree and store the nodes in a STL container - the begin/end
> iterators of this STL container are used to iterate the tree.
> I'm under the impression that we generally iterate through trees by
> the iterator to the node of the tree, instead of storing everything into a
> I would probably have to do this if the tree was an object shared across
> several threads. Is this meant for this type of usage?
> Unsubscribe & other changes:
-- NEU: FreePhone - kostenlos mobil telefonieren! Jetzt informieren: http://www.gmx.net/de/go/freephone
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk