Boost logo

Boost :

Subject: Re: [boost] GSOC 2015 : Project on Concurrent Hash Tables
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-03-07 11:12:40

On 7 Mar 2015 at 10:06, Amarnath V A wrote:

> > Move construction of the map != move construction of the buckets.
> Okay. I am trying to achieve move construction in the same spirit. And
> I am piggybacking on Niall's implementation of _rehash().
> [snip]
> Is this the right direction?

It's better. Not there yet though. Keep going.

> > Old buckets go into a fixed size ring buffer, and get deleted
> > eventually.
> >
> I couldn't really figure out where the ring buffer is which you are
> mentioning here. What am I missing?


> And another question, when I use the above implementation of move
> constructor and later call empty() on the newly created object, I land
> in a segfault. I see that the empy() checks on if the lock state is 2
> and continues to check the next bucket. But, I think here I have all
> buckets set to lock state 2. Why did the swap I performed with the
> tempbuckets and oldmap._buckets not help me? Any pointers will be
> really helpful.

This is a good test of whether you have wrapped your head around the
algorithm and fully understand how it works.

Keep at it, you're getting closer.


ned Productions Limited Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at