Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-04-21 18:06:10

Howard Hinnant:
> I've so far only looked at your implementation for a few minutes. The
> lock-reduced version is tricky. It has been three years since I did
> this, but when I did, I needed 3 flags instead of your two. That may
> have been because I was guarding against max-readers and you're not,
> not sure yet.

Actually most implementations tend to work as intended without a check if
the "writer" bit is adjacent to the "#readers" bits (overflowing the count
sets the writer bit). This is not the case for my implementation though
since I've managed to put the bits in the wrong order. :-)

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